From c12f72945227a8c6341dbf2accdd113a7b7f99fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 11 Mar 2016 15:24:54 +0100 Subject: [PATCH] build: make splint check tolerant of existing defects --- lib/Makefile.am | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 371cc002c..10720a8a3 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -73,10 +73,23 @@ DEB_INCLUDES = -I/usr/include/x86_64-linux-gnu -I/usr/include/i386-linux-gnu ALL_LINT_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(DEB_INCLUDES) \ $(libqb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CPPFLAGS) \ $(LINT_FLAGS) +# expected for the time being (but SHOULD be fixed eventually): +# ipc_setup.c: (in function qb_ipcc_us_setup_connect) +# ipc_setup.c:479:2: Return value (type int32_t) ignored: qb_ipc_us_ready(... +# ipc_setup.c:494:2: Return value (type int32_t) ignored: qb_ipc_auth_cred... +SPLINT_SUMMARY_EXP = " 2 code warnings" run_splint.sh: $(top_srcdir)/configure.ac - @echo "$(SPLINT) $(ALL_LINT_FLAGS) $(addprefix $(top_srcdir)/lib/, $(source_to_lint))" > $@ - $(AM_V_GEN)chmod +x $@ + @echo '$(SPLINT) $(ALL_LINT_FLAGS) \' > $@-t + @echo ' $(addprefix $(top_srcdir)/lib/, $(source_to_lint)) \' >> $@-t + @echo ' 2>&1 | tee $@-o' >> $@-t + @echo 'tail -n1 $@-o | grep -qF $(SPLINT_SUMMARY_EXP)' >> $@-t + @echo 'ret=$$?' >> $@-t + @echo 'rm -f $@-o' >> $@-t + @echo 'test $$ret = 0 || echo "EXPECTED:$(SPLINT_SUMMARY_EXP)"' >> $@-t + @echo 'exit $$ret' >> $@-t + @chmod +x $@-t + $(AM_V_GEN)mv $@-t $@ dist-clean-local: rm -f run_splint.sh