New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable extra warnings #109
Conversation
@hughbe, |
src/Makefile.am
Outdated
@@ -121,6 +121,6 @@ libgdiplus_la_SOURCES = \ | |||
|
|||
libgdiplus_la_LIBADD = $(GDIPLUS_LIBS) | |||
|
|||
AM_CPPFLAGS = $(GDIPLUS_CFLAGS) -Wall -Wno-unused -Wno-format | |||
AM_CPPFLAGS = $(GDIPLUS_CFLAGS) -Wall -Wno-unused -Wno-format -pedantic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't necessary since it's already included in GDIPLUS_CFLAGS
configure.ac
Outdated
@@ -29,7 +29,7 @@ PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION) | |||
# Optional use (experimental and unsupported) of Pango's text rendering on top of Cairo | |||
AC_ARG_WITH(pango, [ --with-pango],[text_v=pango],[text_v=cairo]) | |||
|
|||
GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare" | |||
GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -pedantic" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to the Linux build failure we need to add -std=c99
so it doesn't default to c89 and complains about ancient things.
f4fae86
to
1665e20
Compare
@hughbe ok so I looked at the Linux build and there are two classes of warnings left that get triggered by pedantic:
I can't wrap my head around these at the moment, any ideas? The other one are warnings like:
That one makes more sense to me and is fixed by removing the cast to Do you think we should look into this further or is it "too pedantic" at this point? 😄 If I fix the overflow warnings and uncomment the locations where the *BytesDelegate are used then it compiles to the end at least. |
76bb6a8
to
8ad8abc
Compare
I agree. Pedantic is certainly unecessary for the unit tests. For the product code it may be good. But it looks unecessary. I reverted this change but fixed some of the warnings pedantic wuld have found. |
These I believe are set to the default with CMake (maybe not pedantic).