Require a semicolon for VIR_ENUM_IMPL 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_ENUM_IMPL calls.

Move the verify() statement to the end of the macro and drop
the semicolon, so the compiler will require callers to add a
semicolon.

While we are touching these call sites, standardize on putting
the closing parenth on its own line, as discussed here:
https://www.redhat.com/archives/libvir-list/2019-January/msg00750.html

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:30:15 -05:00
parent 7662194bf3
commit 6a4d938dd3
60 changed files with 520 additions and 281 deletions

View File

@@ -989,7 +989,7 @@ VIR_ENUM_IMPL(virshStorageVol,
N_("dir"),
N_("network"),
N_("netdir"),
N_("ploop"))
N_("ploop"));
static const char *
virshVolumeTypeToString(int type)