From 66e897f77b30d9add357dcff62a33e8ee16d2cc0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 12 Jun 2016 16:21:56 +0300 Subject: Check preprocessor blocks only if parent was allowed to parse. --- deheader | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deheader b/deheader index e77dcae..f1aaf28 100755 --- a/deheader +++ b/deheader @@ -1282,7 +1282,8 @@ class InclusionMap: cnt = cnt + 1 c = match_preproc(["ifndef", "ifdef", "if"], line) if c is not False: - allow_parse_includes = self.check_block(sourcefile, cnt, compiler, defines, maker, verbosity, showerrs, subdir) + if allow_parse_includes == True: + allow_parse_includes = self.check_block(sourcefile, cnt, compiler, defines, maker, verbosity, showerrs, subdir) conditions.append((c, allow_parse_includes)) elif match_preproc("else", line) is not False: allow_parse_includes = not allow_parse_includes -- cgit v1.2.3-70-g09d2