aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-02-03 14:10:00 -0500
committerRob Landley <rob@landley.net>2007-02-03 14:10:00 -0500
commitfd1c5ba0cbbd31c4713d9283c4fa5c3265ad2296 (patch)
tree48f65558e2c9d76fa397e066c14a5642accee992 /lib/portability.h
parent5a60e26fe8de2648689ff8c5659085b99f5891a0 (diff)
downloadtoybox-fd1c5ba0cbbd31c4713d9283c4fa5c3265ad2296.tar.gz
Teach build to build only the toys/*.c selected in .config, and teach
CFG_TOYSH_DEBUG to shut up the spurious "gcc can't tell that this is never actually used uninitialized because gcc is stupid" warnings.
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index 5aa4a0bf..9f3f1b78 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -25,3 +25,15 @@
#define SWAP_LE32(x) (x)
#define SWAP_LE64(x) (x)
#endif
+
+// Some versions of gcc produce spurious "may be uninitialized" warnings in
+// cases where it provably can't happen. Unfortunately, although this warning
+// is calculated and produced separately from the "is definitely used
+// uninitialized" warnings, there's no way to turn off the broken spurious "may
+// be" warnings without also turning off the non-broken "is" warnings.
+
+#if CFG_TOYBOX_DEBUG
+#define GCC_BUG =0
+#else
+#define GCC_BUG
+#endif