Fix warnings about unused fwrite() return value
authorJens Axboe <axboe@kernel.dk>
Wed, 5 Oct 2011 09:50:47 +0000 (11:50 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 5 Oct 2011 09:50:47 +0000 (11:50 +0200)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
client.c
log.c

index d538e8ab95cdecb6dabde63dbf7469c1416fef80..01f64086ae6bbc4f1fc8bf154fef1064008e27f5 100644 (file)
--- a/client.c
+++ b/client.c
@@ -491,10 +491,11 @@ static int handle_client(struct fio_client *client, int one)
                        break;
                case FIO_NET_CMD_TEXT: {
                        const char *buf = (const char *) cmd->payload;
+                       int fio_unused ret;
 
                        if (!client->skip_newline)
                                fprintf(f_out, "Client <%s>: ", client->hostname);
-                       fwrite(buf, cmd->pdu_len, 1, f_out);
+                       ret = fwrite(buf, cmd->pdu_len, 1, f_out);
                        fflush(f_out);
                        client->skip_newline = strchr(buf, '\n') == NULL;
                        free(cmd);
diff --git a/log.c b/log.c
index ec3ebce49e2065423c7ebefa54bc28b4dd7a25f7..a16baafc97846f68e08b1d466eff67ed130b24ae 100644 (file)
--- a/log.c
+++ b/log.c
@@ -68,8 +68,11 @@ int log_err(const char *format, ...)
        if (is_backend)
                return fio_server_text_output(buffer, len);
        else {
-               if (f_err != stderr)
-                       fwrite(buffer, len, 1, stderr);
+               if (f_err != stderr) {
+                       int fio_unused ret;
+
+                       ret = fwrite(buffer, len, 1, stderr);
+               }
 
                return fwrite(buffer, len, 1, f_err);
        }