diff options
author | Julius Werner <jwerner@chromium.org> | 2019-05-01 16:48:44 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-05-06 10:32:24 +0000 |
commit | c4ab50cdde4bfd01ec7509012b105c88bcf4c953 (patch) | |
tree | 93263fbb786985ba8133ebfe22eeea0342688036 /util/romcc/tests | |
parent | 7c712bbb6c969ae7014707bfddedd821035a2171 (diff) |
Makefile.inc: Enable -Wtype-limits
This patch enables -Wtype-limits for the whole repository, which
disallows checking for a condition that must be always true or always
false based on type width (e.g. checking whether an unsigned variable is
negative or whether a 32-bit integer is larger than 4G). This helps
avoid easy to make and hard to find (because they often only affect
error paths) mistakes like
size_t size = fmap_read_area(...);
if (size < 0)
die("If only the compiler could've told me to use ssize_t instead");
Change-Id: I19edabfd092d09dad720e3fc47b44838163bfe25
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32536
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/romcc/tests')
0 files changed, 0 insertions, 0 deletions