On Sun, Feb 26, 2023 at 12:45:27PM +0100, Laszlo Ersek wrote:
Currently, a semicolon after a DEFINE_VECTOR_TYPE(...) macro
invocation is
not needed, nor does our documentation in "common/utils/vector.h"
prescribe one. Furthermore, it breaks ISO C, which gcc reports with
"-Wpedantic":
> warning: ISO C does not allow extra ‘;’ outside of a function
> [-Wpedantic]
Our current usage is inconsistent; a proper subset of all our
DEFINE_VECTOR_TYPE() invocations is succeeded by a semicolon. We could
remove these semicolons, but that doesn't play nicely with Emacs's C
I'm not sure if the possessive is spelled "Emacs'". Either way,
Reviewed-by: Eric Blake <eblake(a)redhat.com>
language parser. Thus, force the semicolon instead.
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
Notes:
v5:
- force semicolon after DEFINE_VECTOR_TYPE() [Eric]
- reword commit message accordingly
v4:
- new patch in v4
common/utils/vector.h | 7 +++++--
lib/uri.c | 2 +-
copy/file-ops.c | 2 +-
copy/nbd-ops.c | 2 +-
dump/dump.c | 2 +-
fuse/nbdfuse.h | 2 +-
info/list.c | 2 +-
info/map.c | 2 +-
ublk/nbdublk.h | 2 +-
ublk/tgt.c | 2 +-
10 files changed, 14 insertions(+), 11 deletions(-)
I grepped to make sure no other files had the pattern, even if they
weren't being compiled by your choice of configure options.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization:
qemu.org |
libvirt.org