aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 106cd3e2e..800799613 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -88,3 +88,18 @@ endif
ncmpc_SOURCES+=${ncmpc_headers}
+#
+# sparse
+#
+
+SPARSE = sparse
+SPARSE_FLAGS = -Wdecl -Wdefault-bitfield-sign -Wdo-while -Wenum-mismatch \
+ -Wnon-pointer-null -Wptr-subtraction-blows -Wreturn-void \
+ -Wshadow -Wtypesign \
+ -D__transparent_union__=unused
+
+sparse-check:
+ for i in $(ncmpc_SOURCES); \
+ do \
+ $(SPARSE) -I. -I.. -I/usr/lib/gcc/$(shell gcc -dumpmachine)/4.3/include -I/usr/lib/gcc/$(shell gcc -dumpmachine)/4.3/include-fixed $(AM_CPPFLAGS) $(SPARSE_FLAGS) $(srcdir)/$$i || exit; \
+ done