summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-08-20 17:10:41 +0000
committerEric S. Raymond <esr@thyrsus.com>2015-08-20 17:10:41 +0000
commited19064c465219fbe13f014a77c7624ef81913c9 (patch)
tree87780ec7ef99e19aa577e276790c8305e961b108
parent8c47f6fef919d003c49849aa26599763940f6e68 (diff)
parent6b14e425a724ce37bb800464c7ae30a0c018ca3e (diff)
downloaddeheader-ed19064c465219fbe13f014a77c7624ef81913c9.tar.gz
deheader-ed19064c465219fbe13f014a77c7624ef81913c9.tar.bz2
deheader-ed19064c465219fbe13f014a77c7624ef81913c9.tar.xz
deheader-ed19064c465219fbe13f014a77c7624ef81913c9.zip
Merge branch 'remove_unnecessary_so_far' into 'master'
Remove all unnecessary-so-far headers when test compiling Prior to this fix, deheader would remove headers individually, and see whether a file compiled. At the end it would remove all headers that it identified as independently removable. However it may be that two headers can each be independently removed, but removing both at the same time causes a compilation failure. This fix removes all headers identified as unnecessary-so-far for each test compile, preventing compilation failures at the end due to this issue. See merge request !2
-rwxr-xr-xdeheader2
1 files changed, 1 insertions, 1 deletions
diff --git a/deheader b/deheader
index 77a997f..0d66ed4 100755
--- a/deheader
+++ b/deheader
@@ -1400,7 +1400,7 @@ def c_analyze(sourcefile, maker, includes, requires, verbosity):
print "deheader: in %s, %s prevents uninclusion of %s" % (sourcefile, trigger, trim(header))
retain += 1
if not retain:
- saveit.remove_headers([header])
+ saveit.remove_headers(unneeded + [header])
(st, _t) = testcompile(sourcefile, maker, " without %s" % trim(header), verbosity, showerrs=False)
if st == 0:
unneeded.append(header)