From 6b14e425a724ce37bb800464c7ae30a0c018ca3e Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 26 Jul 2015 13:07:16 -0700 Subject: 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. --- deheader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deheader b/deheader index f388d45..82294f2 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) -- cgit v1.2.3-70-g09d2