]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: build with -Wextra and sort out certain warnings
authorWilly Tarreau <w@1wt.eu>
Thu, 20 Sep 2018 08:38:08 +0000 (10:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 Sep 2018 09:43:19 +0000 (11:43 +0200)
commitf7db9305aa8642cb5145bba6f8948400c52396af
treea0fecfa08de192c44ea74b8102a8a35982c85e2c
parent7d7ab43a33f86e39fa3ce232e84235c9ed590445
BUILD: build with -Wextra and sort out certain warnings

We're not far from being able to build with -Wextra -Werror. The
following warnings had to be disabled to enable a clean build at
-Wextra on x86_64 using gcc 4.7, 5.5, 6.4 and 7.3 :

   sign-compare, unused-parameter, old-style-declaration,
   ignored-qualifiers, clobbered, missing-field-initializers,
   implicit-fallthrough

The following extra warnings could be added without side effects :

   type-limits, shift-negative-value, shift-overflow=2 duplicated-cond,
   null-dereference

As a result, -Wextra was enabled by default, hoping it will help catch
issues over the long term. If new undesired warnings pop up, it's easy
to disable them using the nowarn call.
Makefile