diff options
author | Marc-André Lureau | 2022-02-23 21:58:22 +0100 |
---|---|---|
committer | Marc-André Lureau | 2022-03-22 11:40:51 +0100 |
commit | c08401793a1f298b4d52410835b01ca9b64c313a (patch) | |
tree | dc6e619b3732ab994e9597f26bb8a98b7cdf8430 /block | |
parent | Replace GCC_FMT_ATTR with G_GNUC_PRINTF (diff) | |
download | qemu-c08401793a1f298b4d52410835b01ca9b64c313a.tar.gz qemu-c08401793a1f298b4d52410835b01ca9b64c313a.tar.xz qemu-c08401793a1f298b4d52410835b01ca9b64c313a.zip |
compiler.h: replace QEMU_WARN_UNUSED_RESULT with G_GNUC_WARN_UNUSED_RESULT
One less qemu-specific macro. It also helps to make some headers/units
only depend on glib, and thus moved in standalone projects eventually.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2-refcount.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 94033972be..b91499410c 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -33,9 +33,11 @@ static int64_t alloc_clusters_noref(BlockDriverState *bs, uint64_t size, uint64_t max); -static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, - int64_t offset, int64_t length, uint64_t addend, - bool decrease, enum qcow2_discard_type type); + +G_GNUC_WARN_UNUSED_RESULT +static int update_refcount(BlockDriverState *bs, + int64_t offset, int64_t length, uint64_t addend, + bool decrease, enum qcow2_discard_type type); static uint64_t get_refcount_ro0(const void *refcount_array, uint64_t index); static uint64_t get_refcount_ro1(const void *refcount_array, uint64_t index); @@ -803,12 +805,12 @@ found: /* XXX: cache several refcount block clusters ? */ /* @addend is the absolute value of the addend; if @decrease is set, @addend * will be subtracted from the current refcount, otherwise it will be added */ -static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, - int64_t offset, - int64_t length, - uint64_t addend, - bool decrease, - enum qcow2_discard_type type) +static int update_refcount(BlockDriverState *bs, + int64_t offset, + int64_t length, + uint64_t addend, + bool decrease, + enum qcow2_discard_type type) { BDRVQcow2State *s = bs->opaque; int64_t start, last, cluster_offset; |