grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lists and aliasing (Re: Freeze on 27 February)


From: Lennart Sorensen
Subject: Re: Lists and aliasing (Re: Freeze on 27 February)
Date: Wed, 22 Feb 2012 11:25:22 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Feb 22, 2012 at 11:18:54AM -0500, Lennart Sorensen wrote:
> Well it is in WARN_FLAGS and TARGET_CFLAGS in configure.
> 
> And during build:
> gcc-4.4 -DHAVE_CONFIG_H -I. -I../..  -Wall -W -I./include -DGRUB_UTIL=1 
> -DGRUB_LIBDIR=\"/usr/lib/grub\" -DLOCALEDIR=\"/usr/share/locale\"  
> -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=POWERPC_EMU -DGRUB_TARGET_CPU_POWERPC=1 
> -DGRUB_FILE=\"util/grub-mkimage.c\" -I. -I../.. -I. -I../.. -I../../include 
> -I./include -I./grub-core/gnulib -I../../grub-core/gnulib 
> -DGRUB_PKGLIBROOTDIR=\"/usr/lib/grub\"   -g -Wall -O2 -Wall -W -Wshadow 
> -Wold-style-declaration -Wold-style-definition -Wpointer-arith -Wundef 
> -Wextra -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined 
> -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch 
> -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero 
> -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul 
> -Wformat-extra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers 
> -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self 
> -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op 
> -Wmain -Wmissing-braces -W
> missing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn 
> -Wmudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat 
> -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type 
> -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch 
> -Wsync-nand -Wtrigraphs  -Wtype-limits -Wundef -Wuninitialized 
> -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label 
> -Wunused-parameter -Wunused-result -Wunused-value  -Wunused-variable 
> -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings 
> -Wmissing-declarations -Wmissing-parameter-type  -Wmissing-prototypes 
> -Wnested-externs -Wstrict-prototypes -Wpointer-sign -Wno-undef 
> -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls 
> -Wno-unreachable-code -Wno-conversion -Wno-old-style-definition   -c -o 
> util/grub_mkimage-grub-mkimage.o `test -f 'util/grub-mkimage.c' || echo 
> '../../'`util/grub-mkimage.c
> In file included from ../../util/grub-mkimage.c:45:
> ../../grub-core/gnulib/argp.h:610: warning: no previous prototype for 
> 'argp_usage'
> ../../grub-core/gnulib/argp.h:616: warning: no previous prototype for 
> '_option_is_short'
> ../../grub-core/gnulib/argp.h:628: warning: no previous prototype for 
> '_option_is_end'
> 
> So something sure adds it.

That actually looks like a mistake.

HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS"
TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls 
-Wmissing-prototypes"

but WARN_FLAGS="-Wall -W -Wshadow -Wold-style-declaration 
-Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Warray-bounds 
-Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts 
-Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated 
-Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body 
-Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args 
-Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit 
-Wimplicit-function-declaration -Wimplicit-int -Winit-self 
-Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op 
-Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute 
-Wmissing-noreturn -Wmudflap -Wmultichar -Wnonnull -Woverflow 
-Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-to-int-cast 
-Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing 
-Wswitch -Wsync-nand -Wtrigraphs  -Wtype-limits -Wundef -Wuninitialized 
-Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter 
-Wunused-result -Wunused-value  -Wunused-variable -Wvariadic-macros 
-Wvolatile-register-var -Wwrite-strings -Wmissing-declarations 
-Wmissing-parameter-type  -Wmissing-prototypes -Wnested-externs 
-Wstrict-prototypes -Wpointer-sign"

So by having -Wmissing-prototypes in WARN_FLAGS it gets set twice in
TARGET_CFLAGS and also set once in HOST_CFLAGS.  Perhaps that was
not meant to be in there and should only have been in TARGET_CFLAGS.

-- 
Len Sorensen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]