From: Cole Robinson Date: Sun, 20 Jan 2019 16:32:42 +0000 (-0500) Subject: Require a semicolon for VIR_LOG_INIT calls X-Git-Tag: v5.1.0-rc1~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bec5488a60ece485309dc2955227b61bf1a2f27;p=thirdparty%2Flibvirt.git Require a semicolon for VIR_LOG_INIT calls Missing semicolon at the end of macros can confuse some analyzers (like cppcheck ), and we have a mix of semicolon and non-semicolon usage through the code. Let's standardize on using a semicolon for VIR_LOG_INIT calls. Drop the semicolon from the final statement of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: John Ferlan Signed-off-by: Cole Robinson --- diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 25f51b1acb..be39b35da2 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -45,7 +45,7 @@ #define SYSFS_SYSTEM_PATH "/sys/devices/system" -VIR_LOG_INIT("conf.capabilities") +VIR_LOG_INIT("conf.capabilities"); VIR_ENUM_DECL(virCapsHostPMTarget); VIR_ENUM_IMPL(virCapsHostPMTarget, VIR_NODE_SUSPEND_TARGET_LAST, diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index 5775563508..a21caefaba 100644 --- a/src/qemu/qemu_extdevice.c +++ b/src/qemu/qemu_extdevice.c @@ -33,7 +33,7 @@ #define VIR_FROM_THIS VIR_FROM_QEMU -VIR_LOG_INIT("qemu.qemu_extdevice") +VIR_LOG_INIT("qemu.qemu_extdevice"); int qemuExtDeviceLogCommand(qemuDomainLogContextPtr logCtxt, diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 15b6ab8870..835a9caf46 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -44,7 +44,7 @@ #define VIR_FROM_THIS VIR_FROM_NONE -VIR_LOG_INIT("qemu.tpm") +VIR_LOG_INIT("qemu.tpm"); /* * executables for the swtpm; to be found on the host diff --git a/src/util/virfilecache.c b/src/util/virfilecache.c index 15c0d99fd9..eb7dbd97cc 100644 --- a/src/util/virfilecache.c +++ b/src/util/virfilecache.c @@ -41,7 +41,7 @@ #define VIR_FROM_THIS VIR_FROM_NONE -VIR_LOG_INIT("util.filecache") +VIR_LOG_INIT("util.filecache"); struct _virFileCache { diff --git a/src/util/virlog.h b/src/util/virlog.h index 8edd390378..775a726b06 100644 --- a/src/util/virlog.h +++ b/src/util/virlog.h @@ -79,7 +79,7 @@ struct _virLogSource { .priority = VIR_LOG_ERROR, \ .serial = 0, \ .flags = 0, \ - }; + } /* * If configured with --enable-debug=yes then library calls diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 23563fe925..9e5a14158f 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -33,7 +33,7 @@ #define VIR_FROM_THIS VIR_FROM_RESCTRL -VIR_LOG_INIT("util.virresctrl") +VIR_LOG_INIT("util.virresctrl"); /* Resctrl is short for Resource Control. It might be implemented for various