[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 2/4] build/printf: fix incorrect format specifiers
On Tue, Feb 14, 2017 at 12:30:55PM +0000, Roger Pau Monne wrote: > The following incorrect format specifiers and incorrect number of parameters > passed to printf like functions are reported by clang: > > mce.c:601:18: error: data argument not used by format string > [-Werror,-Wformat-extra-args] > smp_processor_id()); > ^ > > xenpm.c:102:23: error: data argument not used by format string > [-Werror,-Wformat-extra-args] > what, argv[argc > 1]); > ^ > > libxl_internal.c:25:69: error: data argument not used by format string > [-Werror,-Wformat-extra-args] > libxl__log(ctx, XTL_CRITICAL, ENOMEM, 0,0, func, INVALID_DOMID, L); > ^ > libxl_internal.c:24:17: note: expanded from macro 'L' > func, (unsigned long)nmemb, (unsigned long)size > ^ > libxl_internal.c:26:21: error: data argument not used by format string > [-Werror,-Wformat-extra-args] > fprintf(stderr, L); > ^ > libxl_internal.c:24:17: note: expanded from macro 'L' > func, (unsigned long)nmemb, (unsigned long)size > ^ > > This patch contains the fixes for them and enables -Wformat for clang. > > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > --- > NB: FWIW, there's a way to disable extra arguments checks > (-Wno-format-extra-args), that would prevent us from having to apply some of > the changes here. However, given that there are not that many occurrences, I > would rather leave the full checks of Wformat enabled. > > NB2: this has only been tested with a FreeBSD clang build (3.8.0), and only > against the components that build on FreeBSD (ie: no qemu-trad, and certainly > no blktap). > --- Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |