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

Pino Toscano pino at kde.org
Sun Mar 13 06:11:26 PDT 2011


Alle domenica 13 marzo 2011, Albert Astals Cid ha scritto:
> A Dissabte, 12 de març de 2011, Pino Toscano va escriure:
> > 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.
> 
> I disagree with that. It will result in people sending patches to
> move all char * to const char* which adds nothing but noise to the
> git history.

-Write-strings is in the new "yes", which is the equivalent of the 
current "kde", so nothing changes for the default configuration.

> I'd just scrap the "extra warnings" setting and by default enable the
> ones we think make sense and that's it.

That may be another idea -- other opinions?

-- 
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/20110313/7f46e7d6/attachment.pgp>


More information about the poppler mailing list