mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Enable -Wmissing-format-attribute warning
Add a couple of missing ATTRIBUTE_FMT_PRINTF annotations * tools/virsh.c, tests/testutils.c: Add printf format attribute * m4/virt-compile-warnings.m4: Enable -Wmissing-format-attribute
This commit is contained in:
parent
4825b521e2
commit
7d76d5d506
@ -67,7 +67,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
||||
dontwarn="$dontwarn -Wpacked"
|
||||
dontwarn="$dontwarn -Wunused-macros"
|
||||
dontwarn="$dontwarn -Woverlength-strings"
|
||||
dontwarn="$dontwarn -Wmissing-format-attribute"
|
||||
dontwarn="$dontwarn -Wstack-protector"
|
||||
|
||||
# Get all possible GCC warnings
|
||||
|
@ -67,7 +67,7 @@ virtTestCountAverage(double *items, int nitems)
|
||||
return (double) (sum / nitems);
|
||||
}
|
||||
|
||||
|
||||
ATTRIBUTE_FMT_PRINTF(3,4)
|
||||
void virtTestResult(const char *name, int ret, const char *msg, ...)
|
||||
{
|
||||
va_list vargs;
|
||||
|
@ -243,7 +243,8 @@ static int vshInit(vshControl *ctl);
|
||||
static int vshDeinit(vshControl *ctl);
|
||||
static void vshUsage(void);
|
||||
static void vshOpenLogFile(vshControl *ctl);
|
||||
static void vshOutputLogFile(vshControl *ctl, int log_level, const char *format, va_list ap);
|
||||
static void vshOutputLogFile(vshControl *ctl, int log_level, const char *format, va_list ap)
|
||||
ATTRIBUTE_FMT_PRINTF(3, 0);
|
||||
static void vshCloseLogFile(vshControl *ctl);
|
||||
|
||||
static int vshParseArgv(vshControl *ctl, int argc, char **argv);
|
||||
|
Loading…
Reference in New Issue
Block a user