From: Kevin Wolf <kwolf@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
qemu-trivial@nongnu.org, Eric Blake <eblake@redhat.com>,
qemu-block@nongnu.org, John Snow <jsnow@redhat.com>,
Hanna Reitz <hreitz@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH] block/qcow2-bitmap: Add missing cast to silent GCC error
Date: Thu, 22 Sep 2022 17:37:21 +0200 [thread overview]
Message-ID: <YyyBMe72wjTK3l0x@redhat.com> (raw)
In-Reply-To: <20220919182755.51967-1-f4bug@amsat.org>
Am 19.09.2022 um 20:27 hat Philippe Mathieu-Daudé geschrieben:
> Commit d1258dd0c8 ("qcow2: autoloading dirty bitmaps") added the
> set_readonly_helper() GFunc handler, correctly casting the gpointer
> user_data in both the g_slist_foreach() caller and the handler.
> Few commits later (commit 1b6b0562db), the handler is reused in
> qcow2_reopen_bitmaps_rw() but missing the gpointer cast, resulting
> in the following error when using Homebrew GCC 12.2.0:
>
> [2/658] Compiling C object libblock.fa.p/block_qcow2-bitmap.c.o
> ../../block/qcow2-bitmap.c: In function 'qcow2_reopen_bitmaps_rw':
> ../../block/qcow2-bitmap.c:1211:60: error: incompatible type for argument 3 of 'g_slist_foreach'
> 1211 | g_slist_foreach(ro_dirty_bitmaps, set_readonly_helper, false);
> | ^~~~~
> | |
> | _Bool
> In file included from /opt/homebrew/Cellar/glib/2.72.3_1/include/glib-2.0/glib/gmain.h:26,
> from /opt/homebrew/Cellar/glib/2.72.3_1/include/glib-2.0/glib/giochannel.h:33,
> from /opt/homebrew/Cellar/glib/2.72.3_1/include/glib-2.0/glib.h:54,
> from /Users/philmd/source/qemu/include/glib-compat.h:32,
> from /Users/philmd/source/qemu/include/qemu/osdep.h:144,
> from ../../block/qcow2-bitmap.c:28:
> /opt/homebrew/Cellar/glib/2.72.3_1/include/glib-2.0/glib/gslist.h:127:61: note: expected 'gpointer' {aka 'void *'} but argument is of type '_Bool'
> 127 | gpointer user_data);
> | ~~~~~~~~~~~~~~~~~~^~~~~~~~~
> At top level:
> FAILED: libblock.fa.p/block_qcow2-bitmap.c.o
>
> Fix by adding the missing gpointer cast.
>
> Fixes: 1b6b0562db ("qcow2: support .bdrv_reopen_bitmaps_rw")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Thanks, applied to the block branch. And in case qemu-trivial picks it
up anyway:
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
next prev parent reply other threads:[~2022-09-22 15:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 18:27 [PATCH] block/qcow2-bitmap: Add missing cast to silent GCC error Philippe Mathieu-Daudé
2022-09-19 18:27 ` Philippe Mathieu-Daudé via
2022-09-19 19:10 ` Vladimir Sementsov-Ogievskiy
2022-09-22 15:37 ` Kevin Wolf [this message]
2022-09-29 19:27 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YyyBMe72wjTK3l0x@redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=f4bug@amsat.org \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=vsementsov@virtuozzo.com \
--cc=vsementsov@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.