Commit d6261529 authored by Jehan's avatar Jehan

configure: add warning for forgotten return value on non-void functions.

Adding -Wreturn-type for general case, but also -Wsystem-headers to warn
of g_return_if_fail() on non-void, since these are macros from system
headers directory, and -Wreturn-type would not warn for these.
parent bd9afce9
...@@ -434,6 +434,14 @@ CFLAGS="$CFLAGS $extra_warnings" ...@@ -434,6 +434,14 @@ CFLAGS="$CFLAGS $extra_warnings"
GIMP_DETECT_CFLAGS(extra_warnings, '-fdiagnostics-show-option') GIMP_DETECT_CFLAGS(extra_warnings, '-fdiagnostics-show-option')
CFLAGS="$CFLAGS $extra_warnings" CFLAGS="$CFLAGS $extra_warnings"
GIMP_DETECT_CFLAGS(extra_warnings, '-Wreturn-type')
CFLAGS="$CFLAGS $extra_warnings"
# -Wreturn-type warns on forgotten return on non-void functions,
# but not of g_return_if_fail() on non-void functions.
# -Wsystem-headers is needed for that.
GIMP_DETECT_CFLAGS(extra_warnings, '-Wsystem-headers')
CFLAGS="$CFLAGS $extra_warnings"
# Extra optimization flags for super performance # Extra optimization flags for super performance
GIMP_DETECT_CFLAGS(extra_warnings, '--omg-optimized') GIMP_DETECT_CFLAGS(extra_warnings, '--omg-optimized')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment