summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-11-02 12:09:26 +0100
committerGuido Günther <agx@sigxcpu.org>2014-11-02 12:09:26 +0100
commit7e3dbba7e329a858948eb4c3e4e87c7741d1d7fe (patch)
treefda3b9931292218ca2b64d46717f8e5d2bcbc609 /cfg.mk
parent360da793491fee45fa0b1cb26fc05347d4b8e03a (diff)
New upstream version 1.2.10~rc2
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index 682687a3e..927240b83 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -962,6 +962,14 @@ sc_prohibit_paren_brace:
halt='Put space between closing parenthesis and opening brace' \
$(_sc_search_regexp)
+# C guarantees that static variables are zero initialized, and some compilers
+# waste space by sticking explicit initializers in .data instead of .bss
+sc_prohibit_static_zero_init:
+ @prohibit='\bstatic\b.*= *(0[^xX0-9]|NULL|false)' \
+ in_vc_files='\.[chx](\.in)?$$' \
+ halt='static variables do not need explicit zero initialization'\
+ $(_sc_search_regexp)
+
# FreeBSD exports the "devname" symbol which produces a warning.
sc_prohibit_devname:
@prohibit='\bdevname\b' \