Skip to content

Commit

Permalink
make: Remove splint tests (#374)
Browse files Browse the repository at this point in the history
Now that splint is actually contradicting errors that come from
the compilers I think it's time to retire it. I could cope with it
being a minor nuisance on the argument that "another check can't
hurt", but contradicting the actual compilers is too much.

The CI has Coverity installed which is much more up-to-date anyway.
Splint hasn't been updated since 2010
  • Loading branch information
chrissie-c authored and fabbione committed Dec 11, 2019
1 parent 3da8082 commit 51a03aa
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 50 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ addons:
apt:
packages:
- check
- splint
# for ipc.test:test_ipc_dispatch_*_deadlock_provoke
- libglib2.0-dev # natively present, but doesn't hurt
# for "make rpm"
Expand Down
6 changes: 0 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ AC_PROG_MAKE_SET
AC_CHECK_PROGS([PKGCONFIG], [pkg-config])
AC_CHECK_PROGS([DOXYGEN], [doxygen])
AM_CONDITIONAL(HAVE_DOXYGEN, test -n "${DOXYGEN}")
AC_CHECK_PROGS([SPLINT], [splint])
AM_CONDITIONAL(HAVE_SPLINT, test -n "${SPLINT}")
AM_COND_IF([HAVE_SPLINT],
[AC_CHECK_PROGS([DPKG_ARCHITECTURE], [dpkg-architecture])
AM_CONDITIONAL([HAVE_DPKG_ARCHITECTURE], test -n "${DPKG_ARCHITECTURE}")],
[AM_CONDITIONAL([HAVE_DPKG_ARCHITECTURE], [false])])
AC_CHECK_TOOLS([NM], [eu-nm nm], [:])
AC_CHECK_TOOLS([READELF], [eu-readelf readelf], [:])
AM_PATH_PYTHON([2.6],, [:])
Expand Down
43 changes: 0 additions & 43 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -108,46 +108,3 @@ qblog_script.ld: %.ld: %.ld.in
pkgconfigexecdir = $(libdir)/pkgconfig
pkgconfigexec_DATA = libqb.pc

if HAVE_SPLINT
check_SCRIPTS = run_splint.sh
TESTS = $(check_SCRIPTS)
# This is a hack because Ubuntu (Debian fixed in #675025) doesn't set the arch path
# in splint (https://bugs.launchpad.net/ubuntu/+source/splint/+bug/1786658)
if HAVE_DPKG_ARCHITECTURE
DEB_INCLUDES = -I/usr/include/$$($(DPKG_ARCHITECTURE) -qDEB_HOST_GNU_TYPE)
else
DEB_INCLUDES =
endif

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 is stupid:
# log_format.c:397:22: Arrow access field of non-struct or union pointer (struct
# log_format.c:408:22: Arrow access field of non-struct or union pointer (struct
# log_format.c:415:13: Arrow access field of non-struct or union pointer (struct

SPLINT_SUMMARY_EXP = " 5 code warnings"

run_splint.sh: $(top_srcdir)/configure.ac
@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

clean-local:
rm -f run_splint.sh
endif

0 comments on commit 51a03aa

Please sign in to comment.