From 2746a6c05c384a3d5eab192ecd151cb97a85b181 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 10 Feb 2008 17:18:03 +0100 Subject: [PATCH] Ensure there are no removable (useless) if-before-free tests. * bootstrap.conf (gnulib_modules): Add useless-if-before-free. * Makefile.maint (sc_avoid_if_before_free): New rule. --- Makefile.maint | 7 +++++++ bootstrap.conf | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.maint b/Makefile.maint index 3fbfa42..6d280ff 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -101,6 +101,13 @@ syntax-check: $(local-check) # exit 1; } || : # FIXME: don't allow `#include .strings\.h' anywhere +sc_avoid_if_before_free: + @$(srcdir)/build-aux/useless-if-before-free \ + $(useless_free_options) \ + $$($(CVS_LIST_EXCEPT)) && \ + { echo '$(ME): found useless "if" before "free" above' 1>&2; \ + exit 1; } || : + sc_cast_of_argument_to_free: @grep -nE '\&2; \ diff --git a/bootstrap.conf b/bootstrap.conf index bd76ba7..2452872 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -82,7 +82,9 @@ gnulib_modules=" strftime strpbrk strtoimax strtoumax strverscmp sys_stat timespec tzset unicodeio unistd-safer unlink-busy unlinkdir unlocked-io - uptime userspec utimecmp utimens + uptime + useless-if-before-free + userspec utimecmp utimens vasprintf-posix vc-list-files verify version-etc-fsf -- 2.7.4