qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] virtio-9p: move G_GNUC_PRINTF to header
@ 2025-06-14  2:07 Sean Wei
  2025-06-14  2:08 ` [PATCH 1/2] fsdev/9p-marshal: " Sean Wei
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sean Wei @ 2025-06-14  2:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Sean Wei, Christian Schoenebeck, Greg Kurz

v9fs_string_sprintf() and v9fs_path_sprintf() already have
G_GNUC_PRINTF annotations in their own *.c files, but the
prototypes in the corresponding headers lack them.  When another
translation unit includes only the header, -Wformat can no longer
validate the argument list.

This series relocates the annotations to fsdev/9p-marshal.h and
hw/9pfs/9p.h, then drops the now-redundant annotations in
the *.c files.  There is no functional change.

I've checked all call sites for these two helper function, all
of them already passes the correct number of arguments.

A minimal PoC (sent as the next mail in the thread) demo how
G_GNUC_PRINTF behaves differently when the attribute is present
only in code.c or code.h file.

--

Sean Wei (3):
  fsdev/9p-marshal: move G_GNUC_PRINTF to header
  hw/9pfs: move G_GNUC_PRINTF to header

 fsdev/9p-marshal.c |  3 +--
 fsdev/9p-marshal.h |  2 +-
 hw/9pfs/9p.c       |  3 +--
 hw/9pfs/9p.h       |  2 +-
 4 files changed, 4 insertions(+), 6 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-06-20 15:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-14  2:07 [PATCH 0/2] virtio-9p: move G_GNUC_PRINTF to header Sean Wei
2025-06-14  2:08 ` [PATCH 1/2] fsdev/9p-marshal: " Sean Wei
2025-06-16  5:10   ` Philippe Mathieu-Daudé
2025-06-14  2:09 ` [PATCH 2/2] hw/9pfs: " Sean Wei
2025-06-16  5:10   ` Philippe Mathieu-Daudé
2025-06-14  2:09 ` [PoC] show header-vs-source G_GNUC_PRINTF behavior Sean Wei
2025-06-20 14:17 ` [PATCH 0/2] virtio-9p: move G_GNUC_PRINTF to header Christian Schoenebeck
2025-06-20 15:04   ` Sean Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).