[PATCH 1/2] ppc: Fix compiler warning in ptrace.c [-Wno-array-bounds]

2011-05-07 Thread Stratos Psomadakis
The trick used to bypass the thread_struct fpr array in order to access the
struct fpscr, in arch/powerpc/kernel/ptrace.c, can trigger an array subscript
is above array bounds [-Werror=array-bounds] warning.

Add -Wno-array-bounds to CFLAGS_ptrace.o, in arch/powerpc/kernel/Makefile to
slience this warning.

Signed-off-by: Stratos Psomadakis pso...@ece.ntua.gr
---
 arch/powerpc/kernel/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 3bb2a3e..92b1002 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-CFLAGS_ptrace.o+= -DUTS_MACHINE='$(UTS_MACHINE)'
+CFLAGS_ptrace.o+= -DUTS_MACHINE='$(UTS_MACHINE)' 
-Wno-array-bounds
 
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
-- 
1.5.6.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] ppc: Fix compiler warning in ptrace.c [-Wno-array-bounds]

2011-05-07 Thread Andreas Schwab
Stratos Psomadakis pso...@cslab.ece.ntua.gr writes:

 +CFLAGS_ptrace.o  += -DUTS_MACHINE='$(UTS_MACHINE)' 
 -Wno-array-bounds

You need to check first whether the option is valid.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
And now for something completely different.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[RESEND PATCH 1/2] ppc: Fix compiler warning in ptrace.c [-Wno-array-bounds]

2011-05-07 Thread Stratos Psomadakis
The trick used to bypass the thread_struct fpr array in order to access the
struct fpscr, in arch/powerpc/kernel/ptrace.c, can trigger an array subscript
is above array bounds [-Werror=array-bounds] warning.

Add -Wno-array-bounds to CFLAGS_ptrace.o, in arch/powerpc/kernel/Makefile to
slience this warning.

Signed-off-by: Stratos Psomadakis pso...@ece.ntua.gr
---
 arch/powerpc/kernel/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 3bb2a3e..92b1002 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-CFLAGS_ptrace.o+= -DUTS_MACHINE='$(UTS_MACHINE)'
+CFLAGS_ptrace.o+= -DUTS_MACHINE='$(UTS_MACHINE)' $(call 
cc-option, -Wno-array-bounds)
 
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
-- 
1.5.6.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] ppc: Fix compiler warning in ptrace.c [-Wno-array-bounds]

2011-05-07 Thread Stratos Psomadakis
On 05/07/2011 06:18 PM, Andreas Schwab wrote:
 Stratos Psomadakis pso...@cslab.ece.ntua.gr writes:

 +CFLAGS_ptrace.o += -DUTS_MACHINE='$(UTS_MACHINE)' 
 -Wno-array-bounds
 You need to check first whether the option is valid.

 Andreas.

I resent the patch, with $(call cc-option) to check if GCC supports the
option. Is it ok?

Thx.

-- 
Stratos Psomadakis
pso...@ece.ntua.gr

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev