|
| 1 | +AC_DEFUN([ATHEME_CC_ENABLE_WARNINGS], |
| 2 | + [ |
| 3 | + ATHEME_CC_TEST_CFLAGS([-Werror=unknown-warning-option]) |
| 4 | + ATHEME_CC_TEST_CFLAGS([-Werror=implicit]) |
| 5 | +
|
| 6 | + ATHEME_CC_TEST_CFLAGS([-Weverything]) |
| 7 | +
|
| 8 | + AS_IF([test "x${ATHEME_CC_TEST_CFLAGS_RESULT}" = "xyes"], |
| 9 | + [ |
| 10 | +
|
| 11 | + ATHEME_CC_TEST_CFLAGS([-Wno-address-of-packed-member]) |
| 12 | + ATHEME_CC_TEST_CFLAGS([-Wno-disabled-macro-expansion]) |
| 13 | + ATHEME_CC_TEST_CFLAGS([-Wno-format-pedantic]) |
| 14 | + ATHEME_CC_TEST_CFLAGS([-Wno-missing-variable-declarations]) |
| 15 | + ATHEME_CC_TEST_CFLAGS([-Wno-pedantic]) |
| 16 | + ATHEME_CC_TEST_CFLAGS([-Wno-reserved-id-macro]) |
| 17 | + ATHEME_CC_TEST_CFLAGS([-Wno-unused-command-line-argument]) |
| 18 | +
|
| 19 | + ], [ |
| 20 | +
|
| 21 | + ATHEME_CC_TEST_CFLAGS([-Wall]) |
| 22 | + ATHEME_CC_TEST_CFLAGS([-Wextra]) |
| 23 | +
|
| 24 | + ATHEME_CC_TEST_CFLAGS([-Waggregate-return]) |
| 25 | + ATHEME_CC_TEST_CFLAGS([-Waggressive-loop-optimizations]) |
| 26 | + ATHEME_CC_TEST_CFLAGS([-Walloc-zero]) |
| 27 | + ATHEME_CC_TEST_CFLAGS([-Walloca]) |
| 28 | + ATHEME_CC_TEST_CFLAGS([-Wbad-function-cast]) |
| 29 | + ATHEME_CC_TEST_CFLAGS([-Wc99-c11-compat]) |
| 30 | + ATHEME_CC_TEST_CFLAGS([-Wcast-qual]) |
| 31 | + ATHEME_CC_TEST_CFLAGS([-Wdangling-else]) |
| 32 | + ATHEME_CC_TEST_CFLAGS([-Wdate-time]) |
| 33 | + ATHEME_CC_TEST_CFLAGS([-Wdisabled-optimization]) |
| 34 | + ATHEME_CC_TEST_CFLAGS([-Wdouble-promotion]) |
| 35 | + ATHEME_CC_TEST_CFLAGS([-Wduplicated-branches]) |
| 36 | + ATHEME_CC_TEST_CFLAGS([-Wduplicated-cond]) |
| 37 | + ATHEME_CC_TEST_CFLAGS([-Wfatal-errors]) |
| 38 | + ATHEME_CC_TEST_CFLAGS([-Wfloat-equal]) |
| 39 | + ATHEME_CC_TEST_CFLAGS([-Wformat-nonliteral]) |
| 40 | + ATHEME_CC_TEST_CFLAGS([-Wformat-security]) |
| 41 | + ATHEME_CC_TEST_CFLAGS([-Wformat-signedness]) |
| 42 | + ATHEME_CC_TEST_CFLAGS([-Wformat-y2k]) |
| 43 | + ATHEME_CC_TEST_CFLAGS([-Winline]) |
| 44 | + ATHEME_CC_TEST_CFLAGS([-Winit-self]) |
| 45 | + ATHEME_CC_TEST_CFLAGS([-Winvalid-pch]) |
| 46 | + ATHEME_CC_TEST_CFLAGS([-Wjump-misses-init]) |
| 47 | + ATHEME_CC_TEST_CFLAGS([-Wlogical-op]) |
| 48 | + ATHEME_CC_TEST_CFLAGS([-Wmissing-declarations]) |
| 49 | + ATHEME_CC_TEST_CFLAGS([-Wmissing-format-attribute]) |
| 50 | + ATHEME_CC_TEST_CFLAGS([-Wmissing-include-dirs]) |
| 51 | + ATHEME_CC_TEST_CFLAGS([-Wmissing-prototypes]) |
| 52 | + ATHEME_CC_TEST_CFLAGS([-Wnested-externs]) |
| 53 | + ATHEME_CC_TEST_CFLAGS([-Wnormalized=nfkc]) |
| 54 | + ATHEME_CC_TEST_CFLAGS([-Wnull-dereference]) |
| 55 | + ATHEME_CC_TEST_CFLAGS([-Wold-style-definition]) |
| 56 | + ATHEME_CC_TEST_CFLAGS([-Woverlength-strings]) |
| 57 | + ATHEME_CC_TEST_CFLAGS([-Wpointer-arith]) |
| 58 | + ATHEME_CC_TEST_CFLAGS([-Wpointer-compare]) |
| 59 | + ATHEME_CC_TEST_CFLAGS([-Wredundant-decls]) |
| 60 | + ATHEME_CC_TEST_CFLAGS([-Wregister]) |
| 61 | + ATHEME_CC_TEST_CFLAGS([-Wrestrict]) |
| 62 | + ATHEME_CC_TEST_CFLAGS([-Wshadow]) |
| 63 | + ATHEME_CC_TEST_CFLAGS([-Wstack-protector]) |
| 64 | +
|
| 65 | + ATHEME_CC_TEST_CFLAGS([-Wstrict-overflow=3]) |
| 66 | + AS_IF([test "x${ATHEME_CC_TEST_CFLAGS_RESULT}" = "xno"], |
| 67 | + [ATHEME_CC_TEST_CFLAGS([-Wstrict-overflow])] |
| 68 | + ) |
| 69 | +
|
| 70 | + ATHEME_CC_TEST_CFLAGS([-Wstrict-prototypes]) |
| 71 | + ATHEME_CC_TEST_CFLAGS([-Wstringop-overflow=4]) |
| 72 | + ATHEME_CC_TEST_CFLAGS([-Wstringop-truncation]) |
| 73 | + ATHEME_CC_TEST_CFLAGS([-Wtrampolines]) |
| 74 | + ATHEME_CC_TEST_CFLAGS([-Wundef]) |
| 75 | + ATHEME_CC_TEST_CFLAGS([-Wunsafe-loop-optimizations]) |
| 76 | + ATHEME_CC_TEST_CFLAGS([-Wunsuffixed-float-constants]) |
| 77 | + ATHEME_CC_TEST_CFLAGS([-Wunused]) |
| 78 | + ATHEME_CC_TEST_CFLAGS([-Wvla]) |
| 79 | + ATHEME_CC_TEST_CFLAGS([-Wwrite-strings]) |
| 80 | +
|
| 81 | + ] |
| 82 | + ) |
| 83 | +
|
| 84 | + ATHEME_CC_TEST_CFLAGS([-Wno-cast-align]) |
| 85 | + ATHEME_CC_TEST_CFLAGS([-Wno-conversion]) |
| 86 | + ATHEME_CC_TEST_CFLAGS([-Wno-inline]) |
| 87 | + ATHEME_CC_TEST_CFLAGS([-Wno-missing-declarations]) |
| 88 | + ATHEME_CC_TEST_CFLAGS([-Wno-missing-include-dirs]) |
| 89 | + ATHEME_CC_TEST_CFLAGS([-Wno-missing-prototypes]) |
| 90 | + ATHEME_CC_TEST_CFLAGS([-Wno-packed]) |
| 91 | + ATHEME_CC_TEST_CFLAGS([-Wno-padded]) |
| 92 | + ATHEME_CC_TEST_CFLAGS([-Wno-sign-conversion]) |
| 93 | + ATHEME_CC_TEST_CFLAGS([-Wno-suggest-attribute=format]) |
| 94 | + ATHEME_CC_TEST_CFLAGS([-Wno-unused-parameter]) |
| 95 | + ATHEME_CC_TEST_CFLAGS([-Wno-unused-variable]) |
| 96 | + ] |
| 97 | +) |
0 commit comments