GNOME Bugzilla – Bug 613749
Werror flag makes trouble(s) for old gcc
Last modified: 2010-03-26 15:21:50 UTC
Created attachment 156925 [details] error output gnome-shell will not compile by using old gcc $ gcc -v Using built-in specs. Target: x86_64-unknown-linux Configured with: ../configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --target=x86_64-unknown-linux --host=x86_64-unknown-linux --prefix=/usr --enable-shared --enable-threads=posix --with-cpu=generic --enable-__cxa_atexit --enable-languages=c,c++,objc,obj-c++,java,fortran --build=x86_64-unknown-linux --with-system-zlib --enable-checking=release --disable-libunwind-exceptions --enable-java-awt=gtk --enable-libgcj-multifile --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre Thread model: posix gcc version 4.1.2 20070626 (rPath Inc.) -- error output attached, i compiled gnome-shell by changing configure.ac diff --git a/configure.ac b/configure.ac index 2f5c0ca..76efe16 100644 --- a/configure.ac +++ b/configure.ac @@ -125,7 +125,7 @@ if test "$enable_compile_warnings" != no ; then if test "$enable_compile_warnings" = error ; then case " $CFLAGS " in *[\ \ ]-Werror[\ \ ]*) ;; - *) CFLAGS="$CFLAGS -Werror" ;; + *) CFLAGS="$CFLAGS" ;; esac fi fi
Created attachment 157162 [details] [review] initialize a variable that gcc warns about
Review of attachment 157162 [details] [review]: Looks fine, might be good to document it as a compiler-quieting initialization /* quiet GCC */ or whatever, since the value of 0 there isn't particularly meaningful and it should never actually be used - there has to be at least one shrink child if 'max(min_height, alloc_height) < natural_height, which is when this function is called. [And the function will divide-by-zero if there are no shrink children]
added a comment and pushed Attachment 157162 [details] pushed as 4aa2473 - initialize a variable that gcc warns about