Skip to content

Commit

Permalink
build: make splint check tolerant of existing defects
Browse files Browse the repository at this point in the history
  • Loading branch information
jnpkrn committed Mar 17, 2016
1 parent 2834143 commit c12f729
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c12f729

Please sign in to comment.