Skip to content

virtio-9p: move G_GNUC_PRINTF to header

Sean Wei qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fsdev/9p-marshal: move G_GNUC_PRINTF to headerfsdev/9p-marshal.c fsdev/9p-marshal.h+2 -31 reply
2/2hw/9pfs: move G_GNUC_PRINTF to headerhw/9pfs/9p.c hw/9pfs/9p.h+2 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-Daudé
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] virtio-9p: move G_GNUC_PRINTF to header

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(-)
Signature · 1 line
2.49.0