[poppler] [PATCH] Simplify the GCC compiler flags/warnings

Pino Toscano pino at kde.org
Sat Mar 12 14:46:37 PST 2011


Alle sabato 12 marzo 2011, Hib Eris ha scritto:
> Two more remarks:
> 
> +if test "x$GCC" == xyes; then
> +  extra_cxxflags="-Wall -Wno-write-strings -Woverloaded-virtual \
> +                  -Wnon-virtual-dtor -Wcast-align -fno-exceptions \
> +                  -fno-check-new -fno-common"
> +  case "$enable_compile_warnings" in
> +    yes)
> +      extra_cxxflags="$extra_cxxflags \
> +                      -D_XOPEN_SOURCE=600 -D_BSD_SOURCE \
> +                      -W -Wno-long-long -Wundef -Wconversion
> -Wpointer-arith \ +                      -Wwrite-strings
> -Wformat-security \
> +                      -Wmissing-format-attribute"
> +      ;;
> +    esac
> +  CXXFLAGS="$extra_cxxflags $CXXFLAGS"
> +fi
> 
> 
> 1. In the 'yes' case, you end up with both  -Wno-write-strings and
> -Wwrite-strings, it is at least not obvious which one the compiler
> will pick.

The last of course.

> 2. The '-W' option could (and in my opinion should) be replaced by
> '-Wextra', see  [1].

That's minor, and that's beside the point of the changes I am proposing 
(ie change the way warnings are set in poppler, without changing which 
ones are added).

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110312/b36caf40/attachment.pgp>


More information about the poppler mailing list