diff options
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r-- | lib9p/srv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib9p/srv.c b/lib9p/srv.c index 6e6a91b..12556b0 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -199,7 +199,11 @@ static void respond_error(struct _lib9p_srv_req *req) { LIB9P_TYP_Rerror, &host, &net); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" +#pragma GCC diagnostic ignored "-Wformat-extra-args" infof("< %v", lo_box_lib9p_msg_Rerror_as_fmt_formatter(&host)); +#pragma GCC diagnostic pop r = write_Rmsg(req, &net); if (r < 0) nonrespond_errorf("write: %s", net_strerror(-r)); @@ -425,7 +429,11 @@ static void handle_message(struct _lib9p_srv_req *ctx) { enum lib9p_msg_type typ; lib9p_Tmsg_unmarshal(&ctx->ctx.basectx, ctx->net_bytes, &typ, host_req); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" +#pragma GCC diagnostic ignored "-Wformat-extra-args" infof("> %v", lo_box_lib9p_msg_as_fmt_formatter(&ctx->ctx.basectx, typ, host_req)); +#pragma GCC diagnostic pop /* Handle it. */ tmessage_handlers[typ](ctx, (void *)host_req, (void *)host_resp); @@ -439,7 +447,11 @@ static void handle_message(struct _lib9p_srv_req *ctx) { typ+1, host_resp, &net_resp)) goto write; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" +#pragma GCC diagnostic ignored "-Wformat-extra-args" infof("< %v", lo_box_lib9p_msg_as_fmt_formatter(&ctx->ctx.basectx, typ+1, &host_resp)); +#pragma GCC diagnostic pop write_Rmsg(ctx, &net_resp); } if (host_req) |