magic/plot
Darryl L. Miles e88dcba1c5 CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks
Guided by CodeQL static code analyser.

FileMayNotBeClosed.ql
FileMayNeverBeClosed.ql

The trick with "if(fp != stdout)" is problematic (to analyser) as
technically 'stdout' can be a global pointer that COULD be modified any
time, so it might have changed between the fopen() and fclose() calls so
the close MAY NEVER occurs (which is problem the analyzer can see).

So local state is maintained as a bool which will also clarify to the
compiler see the intention without concern for external stdout
modification.

Some items appear to be out and out leaks when certain commands are use.
2025-02-22 21:02:49 -05:00
..
Makefile Implemented a new configuration variable "dist_prefix" for 2020-01-28 10:40:01 -05:00
plot.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
plotCmd.c Lookup() constify call-site 2024-12-26 15:20:58 -05:00
plotGremln.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
plotHP.c plotHP.c: warning: incompatible pointer types passing 'int *' to ... 2024-10-09 21:22:37 -04:00
plotInt.h quick and dirty emscripten port 2023-07-12 00:31:37 +09:00
plotMain.c gcc11 -Wall -Wpedantic cleanup (post __attribute__) 2025-01-06 16:25:38 +00:00
plotPNM.c CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks 2025-02-22 21:02:49 -05:00
plotPS.c CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks 2025-02-22 21:02:49 -05:00
plotPixels.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
plotRutils.c 37 x warning: array subscript has type 'char' 2024-10-09 21:12:55 -04:00
plotVers.c CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks 2025-02-22 21:02:49 -05:00
tclplot.c TCL9: Tcl_InitStubs(version="9.0") 2025-01-04 11:08:01 -05:00