Require a semicolon for VIR_LOG_INIT calls

Missing semicolon at the end of macros can confuse some analyzers
(like cppcheck <filename>), 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 <jferlan@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2019-01-20 11:32:42 -05:00
parent 6a4d938dd3
commit 8bec5488a6
6 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -41,7 +41,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("util.filecache")
VIR_LOG_INIT("util.filecache");
struct _virFileCache {

View File

@ -79,7 +79,7 @@ struct _virLogSource {
.priority = VIR_LOG_ERROR, \
.serial = 0, \
.flags = 0, \
};
}
/*
* If configured with --enable-debug=yes then library calls

View File

@ -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