[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 114/153: Enable more GCC warnings
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 114/153: Enable more GCC warnings |
Date: |
Tue, 11 Sep 2018 12:53:05 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 014ed7c22f51463dfbf4566d9d2d7fe959a392ad
Author: Marcel Raad <address@hidden>
AuthorDate: Sat Jul 7 09:00:29 2018 +0200
Enable more GCC warnings
This enables the following additional warnings:
-Wold-style-definition
-Warray-bounds=2 instead of the default 1
-Wformat=2, but only for GCC 4.8+ as Wno-format-nonliteral is not
respected for older versions
-Wunused-const-variable, which enables level 2 instead of the default 1
-Warray-bounds also in debug mode through -ftree-vrp
-Wnull-dereference also in debug mode through
-fdelete-null-pointer-checks
Closes https://github.com/curl/curl/pull/2747
---
m4/curl-compilers.m4 | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 95afae426..b90e44d98 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -1012,6 +1012,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
dnl Only gcc 3.4 or later
if test "$compiler_num" -ge "304"; then
tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
+ tmp_CFLAGS="$tmp_CFLAGS -Wold-style-definition"
fi
#
dnl Only gcc 4.0 or later
@@ -1030,6 +1031,8 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wmissing-parameter-type -Wempty-body"
tmp_CFLAGS="$tmp_CFLAGS -Wclobbered -Wignored-qualifiers"
tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla"
+ dnl required for -Warray-bounds, included in -Wall
+ tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
fi
#
dnl Only gcc 4.5 or later
@@ -1045,12 +1048,23 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
fi
#
+ dnl only gcc 4.8 or later
+ if test "$compiler_num" -ge "408"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
+ fi
+ #
+ dnl Only gcc 5 or later
+ if test "$compiler_num" -ge "500"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
+ fi
+ #
dnl Only gcc 6 or later
if test "$compiler_num" -ge "600"; then
tmp_CFLAGS="$tmp_CFLAGS -Wshift-negative-value"
tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
- tmp_CFLAGS="$tmp_CFLAGS -Wnull-dereference"
+ tmp_CFLAGS="$tmp_CFLAGS -Wnull-dereference
-fdelete-null-pointer-checks"
tmp_CFLAGS="$tmp_CFLAGS -Wduplicated-cond"
+ tmp_CFLAGS="$tmp_CFLAGS -Wunused-const-variable"
fi
#
dnl Only gcc 7 or later
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 109/153: x509asn1: make several functions static, (continued)
- [GNUnet-SVN] [gnurl] 109/153: x509asn1: make several functions static, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 136/153: Don't use Windows path %PWD for SSH tests, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 147/153: sftp: don't send post-qoute sequence when retrying a connection, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 72/153: README.md: add LGTM.com code quality grade for C/C++, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 107/153: http2: avoid set_stream_user_data() before stream is assigned, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 118/153: http2: abort the send_callback if not setup yet, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 117/153: http2: remove four unused nghttp2 callbacks, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 123/153: gopher: Do not translate `?' to `%09', gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 120/153: RELEASE-NOTES: synced, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 122/153: cookie tests: treat files as text, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 114/153: Enable more GCC warnings,
gnunet <=
- [GNUnet-SVN] [gnurl] 119/153: Tests: fixes for Windows, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 121/153: libcurl-thread.3: expand somewhat on the NO_SIGNAL motivation, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 112/153: curl-compilers: enable -Wbad-function-cast on GCC, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 115/153: test1148: disable if decimal separator is not point, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 111/153: configure: conditionally enable pedantic-errors, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 116/153: x509asn1: use FALLTHROUGH, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 100/153: http2: make sure to send after RST_STREAM, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 128/153: docs: clarify NO_PROXY env variable functionality, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 99/153: test1268: check the stderr output as "text", gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 106/153: SSLCERTS: improve the openssl command line, gnunet, 2018/09/11