2004-09-10 22:21:52

by Jesse Barnes

[permalink] [raw]
Subject: [PATCH] fix uninitialized warnings in mempolicy.c

Sorry if you already got these fixes, but err may be used uninitialized in
mempolicy.c in both compat_set_mempolicy and compat_mbind. This patch fixes
that by setting them both to 0.

Signed-off-by: Jesse Barnes <[email protected]>


Attachments:
(No filename) (233.00 B)
compat-mempolicy-warning-fixes.patch (691.00 B)
Download all attachments

2004-09-11 04:37:26

by Anton Blanchard

[permalink] [raw]
Subject: [PATCH] [ppc64] Remove -Wno-uninitialized


> Sorry if you already got these fixes, but err may be used uninitialized in
> mempolicy.c in both compat_set_mempolicy and compat_mbind. This patch fixes
> that by setting them both to 0.

Thanks Jesse, I wonder why I missed this. Yuck, that would explain it.

Andrew: A follow up patch fixing a bunch of ppc64 warnings is on the way.

Anton

===== arch/ppc64/Makefile 1.47 vs edited =====
--- 1.47/arch/ppc64/Makefile Mon Aug 23 06:24:25 2004
+++ edited/arch/ppc64/Makefile Sat Sep 11 14:30:01 2004
@@ -26,8 +26,7 @@

LDFLAGS := -m elf64ppc
LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
-CFLAGS += -msoft-float -pipe -Wno-uninitialized -mminimal-toc \
- -mtraceback=none
+CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none

ifeq ($(CONFIG_POWER4_ONLY),y)
CFLAGS += $(call cc-option,-mcpu=power4)

2004-09-11 05:23:25

by Anton Blanchard

[permalink] [raw]
Subject: [PATCH] [ppc32] Remove -Wno-uninitialized


Remove -Wno-uninitialized on ppc32 too. Ive just found a number of
real bugs on ppc64 by doing the same.

Signed-off-by: Anton Blanchard <[email protected]>

===== arch/ppc/Makefile 1.63 vs edited =====
--- 1.63/arch/ppc/Makefile Wed Sep 1 10:00:00 2004
+++ edited/arch/ppc/Makefile Sat Sep 11 15:17:30 2004
@@ -24,7 +24,7 @@
CPPFLAGS += -Iarch/$(ARCH)
AFLAGS += -Iarch/$(ARCH)
CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \
- -ffixed-r2 -Wno-uninitialized -mmultiple
+ -ffixed-r2 -mmultiple
CPP = $(CC) -E $(CFLAGS)

CHECKFLAGS += -D__powerpc__=1