changeset 45:e60d48d30ef0

Make some of gcc 4.1's dumber warnings go away.
author Rob Landley <rob@landley.net>
date Sun, 31 Dec 2006 19:09:42 -0500
parents e74aa8b8660a
children 5a6241f16e95
files Makefile
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Dec 30 22:01:47 2006 -0500
+++ b/Makefile	Sun Dec 31 19:09:42 2006 -0500
@@ -1,7 +1,7 @@
 # Makefile for toybox.
 # Copyright 2006 Rob Landley <rob@landley.net>
 
-CFLAGS  = -Wall -Wundef -Os
+CFLAGS  = -Wall -Wundef -Wno-char-subscripts -Os
 CC      = $(CROSS_COMPILE)gcc $(CFLAGS) -funsigned-char
 STRIP   = $(CROSS_COMPILE)strip
 HOST_CC = gcc $(CFLAGS) -funsigned-char
@@ -38,7 +38,8 @@
 toyfiles = main.c toys/*.c lib/*.c
 toybox_unstripped: gen_config.h $(toyfiles) toys/toylist.h lib/lib.h toys.h
 	$(CC) $(CFLAGS) -I . $(toyfiles) -o toybox_unstripped \
-		-ffunction-sections -fdata-sections -Wl,--gc-sections
+		-ffunction-sections -fdata-sections -Wl,--gc-sections \
+		2>&1 | sed -n -e '/may be used uninitialized/{s/.*/\n/;h;b};1{x;b};: print;x;/\n/b thing;p;: thing;${x;p}' >&2
 
 toybox: toybox_unstripped
 	$(STRIP) toybox_unstripped -o toybox