]> xenbits.xensource.com Git - people/dstodden/blktap.git/commitdiff
Rework gcc fortification catches, failing -Wunused.
authorDaniel Stodden <daniel.stodden@citrix.com>
Fri, 29 Jul 2011 23:10:09 +0000 (16:10 -0700)
committerDaniel Stodden <daniel.stodden@citrix.com>
Thu, 25 Aug 2011 08:10:51 +0000 (09:10 +0100)
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
drivers/tapdisk-queue.c
drivers/tapdisk-stream.c
vhd/lib/libvhd-index.c

index b3693cab5646ae3190314ce618016a342492ff58..c2d8e45e4032135e23147250d3af8393e1790634 100644 (file)
@@ -433,6 +433,7 @@ tapdisk_lio_ack_event(struct tqueue *queue)
 
        if (lio->flags & LIO_FLAG_EVENTFD) {
                int gcc = read(lio->event_fd, &val, sizeof(val));
+               if (gcc) {};
        }
 }
 
index 94a19b01f28fdd3c169582b4a0db8e29ac40bcfa..de0d084ccbdb9fe0c735a7ad43c21e638e276a3b 100644 (file)
@@ -193,6 +193,7 @@ tapdisk_stream_print_request(td_stream_t *s, td_stream_req_t *req)
        struct td_iovec *iov = &req->iov;
 
        int gcc = write(s->out_fd, iov->base, iov->secs << SECTOR_SHIFT);
+       if (gcc) {};
 
        return iov->secs;
 }
index 2be55db35df8a5432d9bdc46efc9feda21acf92e..ad52a2bc3c32e602b44552c23707e8ed19184460 100644 (file)
@@ -658,6 +658,7 @@ vhdi_append_block(vhdi_context_t *ctx, vhdi_block_t *block, uint32_t *sector)
 out:
        if (err) {
                int gcc = ftruncate(ctx->fd, off);
+               if (gcc) {}
        }
        free(entries);
        return err;
@@ -1184,6 +1185,7 @@ vhdi_file_table_add(const char *name, const char *file, vhdi_file_id_t *_fid)
 out:
        if (err && off) {
                int gcc = ftruncate(fd, off);
+               if (gcc) {};
        }
        close(fd);