summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-11-01 23:08:45 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-11-03 19:41:32 +0100
commit03dafe3202372e557f7125dc8155cb1d564d1f5e (patch)
tree5e289dc97ea58422161586391d1255e4175365d9 /configure.ac
parent0555cb2ea9bdc8e210e87e009154954a9bbc3a55 (diff)
Enable further warning flags, address new warnings
mtd_debug: Remove a duplicate if case. MTD_CAP_NANDFLASH has only one flag set (MTD_WRITEABLE). Directly below, we had a check for MTD_WRITEABLE in the else branch which can't possible ever have triggered. Checking for MTD_WRITEABLE in addition to the CAP constants was probably not intended anyway, given the check for the individual flags if all else fails. integck: We already established that "r" is less than the number of elements in the list, so the loop condition doesn't need to check if w is NULL in addition. At least this way, the compiler "gets" that w cannot be NULL below and doesn't issue warnings. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3223c61..83d754f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,10 @@ UL_WARN_ADD([-Wunused-but-set-variable])
UL_WARN_ADD([-Wunused-parameter])
UL_WARN_ADD([-Wunused-result])
UL_WARN_ADD([-Wunused-variable])
+UL_WARN_ADD([-Wduplicated-cond])
+UL_WARN_ADD([-Wduplicated-branches])
+UL_WARN_ADD([-Wrestrict])
+UL_WARN_ADD([-Wnull-dereference])
UL_WARN_ADD([-Wno-shadow])
UL_WARN_ADD([-Wno-sign-compare])