[PATCH] openbsc[master]: Turn some warnings into errors

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Wed Jan 11 18:53:28 UTC 2017


Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1368

to look at the new patch set (#3).

Turn some warnings into errors

Make warnings (when available) related to common memory-related issues
into errors to harden the source and decrease chance of errors.

Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700
---
M debian/control
M openbsc/configure.ac
2 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/68/1368/3

diff --git a/debian/control b/debian/control
index 79f18df..d9432e2 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@
 Priority: optional
 Build-Depends: debhelper (>= 9),
                autotools-dev,
+               autoconf-archive,
                pkg-config,
                libgtp0-dev,
                libosmocore-dev,
diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 0753834..9fd7325 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -140,6 +140,14 @@
 CFLAGS="$saved_CFLAGS"
 AC_SUBST(SYMBOL_VISIBILITY)
 
+# FIXME: use CC_CHECK_CFLAG_APPEND([-Werror=implicit])
+AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"])
+AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"])
+AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"])
+AX_CHECK_COMPILE_FLAG([-Werror=null-dereference], [CFLAGS="$CFLAGS -Werror=null-dereference"])
+AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"])
+AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"])
+
 # Coverage build taken from WebKit's configure.in
 AC_MSG_CHECKING([whether to enable code coverage support])
 AC_ARG_ENABLE(coverage,

-- 
To view, visit https://gerrit.osmocom.org/1368
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ied9c950dafa65f324cf31298b13b590f56139700
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list