1
0
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:
Cole Robinson
2019-01-20 12:23:29 -05:00
parent 8bec5488a6
commit af36f8a641
68 changed files with 77 additions and 76 deletions

View File

@@ -51,7 +51,7 @@ static int virLXCConfigOnceInit(void)
return 0;
}
VIR_ONCE_GLOBAL_INIT(virLXCConfig)
VIR_ONCE_GLOBAL_INIT(virLXCConfig);
/* Functions */

View File

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