Imake's LogFatal() checks if it's being re-entered and if so, returns,
so we can't mark it NORETURN, leading to static analyzers believing it
can return even in call paths it shouldn't.
Resolves warning from Parfait 1.0.1:
Error: File Invalid
File not Initialized: The value inFile is not initialized as a file.
at line 748 of imake.c in function 'CheckImakefileC'.
inFile initialized at line 738 with fopen(masterc, "r").
inFile destroyed at line 745 with fclose(inFile).
Signed-off-by: Alan Coopersmith <[email protected]>
---
imake.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/imake.c b/imake.c
index 1cb8388..2ca34c3 100644
--- a/imake.c
+++ b/imake.c
@@ -745,7 +745,8 @@ CheckImakefileC(const char *masterc)
fclose(inFile);
LogFatal("Refuse to overwrite: %s", masterc);
}
- fclose(inFile);
+ else
+ fclose(inFile);
}
}
--
1.7.9.2
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel