mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-11-08 00:24:52 +03:00
Require a semicolon for VIR_ONCE_GLOBAL_INIT calls
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>). VIR_ONCE_GLOBAL_INIT is almost exclusively called without an ending semicolon, but let's standardize on using one like the other macros. Add a dummy struct definition at the end 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:
@@ -51,7 +51,7 @@ static int virLXCConfigOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virLXCConfig)
|
||||
VIR_ONCE_GLOBAL_INIT(virLXCConfig);
|
||||
|
||||
|
||||
/* Functions */
|
||||
|
||||
@@ -57,7 +57,7 @@ static int virLXCMonitorOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virLXCMonitor)
|
||||
VIR_ONCE_GLOBAL_INIT(virLXCMonitor);
|
||||
|
||||
static void
|
||||
virLXCMonitorHandleEventExit(virNetClientProgramPtr prog,
|
||||
|
||||
Reference in New Issue
Block a user