diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-04-23 15:04:13 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-04-23 15:21:19 +0300 |
commit | 6f4d2a44169eb4197febcf754cc5e6ae4a10a6b7 (patch) | |
tree | f4c0793de9bc4a8088e707659267ec87e19232cf /configure.ac | |
parent | ca23632064ee137391b035abab2640fb8c027ae0 (diff) | |
download | libmicrohttpd-6f4d2a44169eb4197febcf754cc5e6ae4a10a6b7.tar.gz libmicrohttpd-6f4d2a44169eb4197febcf754cc5e6ae4a10a6b7.zip |
configure: changed warning compiler flags
* Removed -Wformat-overflow=2 and -Wformat-truncation=2, '=2' gives only
false positive warnings.
* Added -Wformat-security
* Added -Wmissing-declarations
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 50f3055e..2bd9dda0 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -157,12 +157,14 @@ AS_VAR_IF([enable_build_type],["debug"], | |||
157 | CFLAGS="${user_CFLAGS}" | 157 | CFLAGS="${user_CFLAGS}" |
158 | MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Og], [-O0]) | 158 | MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Og], [-O0]) |
159 | MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-ggdb3], [-g3], [-ggdb], [-g]) | 159 | MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-ggdb3], [-g3], [-ggdb], [-g]) |
160 | MHD_CHECK_ADD_CC_CFLAGS([-Wextra -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2], [CFLAGS_ac]) | 160 | MHD_CHECK_ADD_CC_CFLAGS([-Wextra -Wdouble-promotion], [CFLAGS_ac]) |
161 | MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Wformat=2], [-Wformat]) | ||
162 | MHD_CHECK_ADD_CC_CFLAGS([-Wformat-overflow -Wformat-truncation -Wformat-security -Wformat-signedness], [CFLAGS_ac]) | ||
161 | MHD_CHECK_ADD_CC_CFLAGS([-Wmissing-include-dirs -Wshift-overflow=2 -Wstringop-overflow=4 -Walloc-zero], [CFLAGS_ac]) | 163 | MHD_CHECK_ADD_CC_CFLAGS([-Wmissing-include-dirs -Wshift-overflow=2 -Wstringop-overflow=4 -Walloc-zero], [CFLAGS_ac]) |
162 | MHD_CHECK_ADD_CC_CFLAGS([-Wduplicated-branches -Wduplicated-cond -Wfloat-equal -Wshadow -Wpointer-arith], [CFLAGS_ac]) | 164 | MHD_CHECK_ADD_CC_CFLAGS([-Wduplicated-branches -Wduplicated-cond -Wfloat-equal -Wshadow -Wpointer-arith], [CFLAGS_ac]) |
163 | MHD_CHECK_ADD_CC_CFLAGS([-Wbad-function-cast -Wcast-qual -Wcast-align=strict -Wwrite-strings -Wconversion], [CFLAGS_ac]) | 165 | MHD_CHECK_ADD_CC_CFLAGS([-Wbad-function-cast -Wcast-qual -Wcast-align=strict -Wwrite-strings -Wconversion], [CFLAGS_ac]) |
164 | MHD_CHECK_ADD_CC_CFLAGS([-Wjump-misses-init -Wlogical-op -Waggregate-return -Wstrict-prototypes], [CFLAGS_ac]) | 166 | MHD_CHECK_ADD_CC_CFLAGS([-Wjump-misses-init -Wlogical-op -Waggregate-return -Wstrict-prototypes], [CFLAGS_ac]) |
165 | MHD_CHECK_ADD_CC_CFLAGS([-Wold-style-definition -Wmissing-prototypes -Wformat-security -Wshift-negative-value], [CFLAGS_ac]) | 167 | MHD_CHECK_ADD_CC_CFLAGS([-Wold-style-definition -Wmissing-declarations -Wmissing-prototypes -Wshift-negative-value], [CFLAGS_ac]) |
166 | CFLAGS="${CFLAGS_ac} ${user_CFLAGS}" | 168 | CFLAGS="${CFLAGS_ac} ${user_CFLAGS}" |
167 | LDFLAGS="${user_LDFLAGS}" | 169 | LDFLAGS="${user_LDFLAGS}" |
168 | MHD_CHECK_ADD_CC_LDFLAG([-Wl,--enable-long-section-names], [LDFLAGS_ac]) | 170 | MHD_CHECK_ADD_CC_LDFLAG([-Wl,--enable-long-section-names], [LDFLAGS_ac]) |