[poppler] [PATCH] Simplify the GCC compiler flags/warnings
Albert Astals Cid
aacid at kde.org
Sun Mar 20 06:59:24 PDT 2011
A Diumenge, 13 de març de 2011, Albert Astals Cid va escriure:
> A Diumenge, 13 de març de 2011, Pino Toscano va escriure:
> > 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.
>
> True, but the current "kde" is something noone uses, if you name it "enable
> warnings" everyone will think it is our default "warnings" setting.
Since it seems noone else cares i'd suggest you go my "simple" way with only
one set of warnings, if we ever need more we can reintroduce the other "yes"
warnings.
Albert
>
> Albert
>
> > > 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?
>
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list