[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] build/printf: fix incorrect format specifiers
On Thu, Feb 09, 2017 at 04:42:00PM +0000, Ian Jackson wrote: > Roger Pau Monne writes ("[PATCH] build/printf: fix incorrect format > specifiers"): > > The following incorrect format specifiers and incorrect number of parameters > > passed to printf like functions are reported by clang: > > Do we know why our GCC builds do not detect these bugs ? In general clang has always been able to detect more of those than gcc, I still remember my ~20 patch series to use clang, and more from others. But no, I don't know the exact reason why gcc doesn't detect those. I've forgot to commit the chunk below, which actually enables this. ---8<--- diff --git a/Config.mk b/Config.mk index 3a1d960..4739f36 100644 --- a/Config.mk +++ b/Config.mk @@ -215,7 +215,7 @@ CFLAGS += -Wall -Wstrict-prototypes # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...' # and is over-zealous with the printf format lint # and is a bit too fierce about unused return values -CFLAGS-$(clang) += -Wno-parentheses -Wno-format -Wno-unused-value +CFLAGS-$(clang) += -Wno-parentheses -Wno-unused-value $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |