On 10/11/2016 05:52 AM, Ian Jackson wrote:
> Boris Ostrovsky writes ("Re: [Xen-devel] [PATCH for-4.8] ipxe: update to 
> newer commit"):
>> On 10/10/2016 12:33 PM, Wei Liu wrote:
>>> Sure. I will check ipxe mailing list in one week.
>> FWIW, here is the patch that I used to pacify gcc.
> Thanks.  I don't think we would want to add more private patches to
> our ipxe in Xen 4.8.
>
> Maybe we could consider these as backports to earlier releases.
> However, I looked at the patch and it mostly seems to be removing null
> pointer checks.  I find this ... surprising.
>

That's because routines have __nonnull attribute (which tells compiler
that arguments are never NULL) and new gcc warns on non-NULL checks for
these arguments.

Another interesting new warning that is fatal with -Werror is
    if(a)
        foo();
        bar();

gcc warns that bar() is indented and maybe braces are needed.

BTW, another option for backporting may be removing -Werror. If we know
we are not changing sources then we might consider this.

Copy/paste so whitespaces will probably be messed up:

diff --git a/tools/firmware/etherboot/Makefile
b/tools/firmware/etherboot/Makefile
index a0578d2..1576b3 100644
--- a/tools/firmware/etherboot/Makefile
+++ b/tools/firmware/etherboot/Makefile
@@ -25,7 +25,7 @@ ROMS = $(addprefix $D/src/bin/, $(addsuffix .rom,
$(ETHERBOOT_NICS)))
 all: $(ROMS)
 
 %.rom: $D/src/arch/i386/Makefile
-       $(MAKE) -C $D/src bin/$(*F).rom
+       $(MAKE) NO_WERROR=1 -C $D/src bin/$(*F).rom
 
 $T:
        if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
@@ -45,7 +45,7 @@ $D/src/arch/i386/Makefile: $T Config
        cat Config >>$@
 
 $D/src/bin/NIC: $D/src/arch/i386/Makefile
-       $(MAKE) -C $D/src bin/NIC
+       $(MAKE) NO_WERROR=1 -C $D/src bin/NIC
 
 .PHONY: clean
 clean:



-boris


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to