diff mbox

[PATXH,v3,2/2] package/xen: Disable strict unused-const-variable checking

Message ID 1481227872-31723-3-git-send-email-alistair.francis@xilinx.com
State Changes Requested
Headers show

Commit Message

Alistair Francis Dec. 8, 2016, 8:11 p.m. UTC
The strict unused-const-variable checking was causing autobuilder errors
when trying to build Xen tools/libxl as the migrate_*[] arrays are not
always accessed.

To avoid the error edit the Makefile to stop the warnings being treated
as errors.

Fixes:
  http://autobuild.buildroot.net/results/0e0/0e0d4aa4a05da5804821951289c0a4049b009c61/

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---
 ...-Disable-strict-unused-const-variable-che.patch | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 package/xen/0003-tools-libxl-Disable-strict-unused-const-variable-che.patch

Comments

Thomas Petazzoni Dec. 8, 2016, 9:06 p.m. UTC | #1
Hello,

On Thu, 8 Dec 2016 12:11:12 -0800, Alistair Francis wrote:

> + CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
> +-	-Wno-declaration-after-statement -Wformat-nonliteral
> ++	-Wno-declaration-after-statement -Wformat-nonliteral \
> ++	-Werror=unused-const-variable=0

Sorry for not catching this earlier, but what we want instead is to
completely remove -Werror. It's pointless for releases, and is causing
to cause other build failures.

Thanks,

Thomas
Alistair Francis Dec. 8, 2016, 10:48 p.m. UTC | #2
On Thu, Dec 8, 2016 at 1:06 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Thu, 8 Dec 2016 12:11:12 -0800, Alistair Francis wrote:
>
>> + CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
>> +-    -Wno-declaration-after-statement -Wformat-nonliteral
>> ++    -Wno-declaration-after-statement -Wformat-nonliteral \
>> ++    -Werror=unused-const-variable=0
>
> Sorry for not catching this earlier, but what we want instead is to
> completely remove -Werror. It's pointless for releases, and is causing
> to cause other build failures.

No worries, I have removed the -Werror. I left the other ones in there though.

Thanks,

Alistair

>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
diff mbox

Patch

diff --git a/package/xen/0003-tools-libxl-Disable-strict-unused-const-variable-che.patch b/package/xen/0003-tools-libxl-Disable-strict-unused-const-variable-che.patch
new file mode 100644
index 0000000..05575fa
--- /dev/null
+++ b/package/xen/0003-tools-libxl-Disable-strict-unused-const-variable-che.patch
@@ -0,0 +1,27 @@ 
+From 2e04c2db466b2d7881b46505741798701b1aa271 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@xilinx.com>
+Date: Wed, 7 Dec 2016 11:35:10 -0800
+Subject: [PATCH] tools/libxl: Disable strict unused-const-variable checking
+
+Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
+---
+ tools/libxl/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
+index defeb40..9d320d1 100644
+--- a/tools/libxl/Makefile
++++ b/tools/libxl/Makefile
+@@ -12,7 +12,8 @@ XLUMAJOR = 4.7
+ XLUMINOR = 0
+ 
+ CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
+-	-Wno-declaration-after-statement -Wformat-nonliteral
++	-Wno-declaration-after-statement -Wformat-nonliteral \
++	-Werror=unused-const-variable=0
+ CFLAGS += -I. -fPIC
+ 
+ ifeq ($(CONFIG_Linux),y)
+-- 
+2.7.4
+