magic/router
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 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
router.h Compatibility with C99 standard 2022-10-29 06:07:46 +02:00
routerInt.h Compatibility with C99 standard 2022-10-29 06:07:46 +02:00
rtrChannel.c Compatibility with C99 standard 2022-10-29 06:07:46 +02:00
rtrCmd.c CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks 2025-02-22 21:02:49 -05:00
rtrDcmpose.c 17 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
rtrDcmpose.h TCL9: ClientData macro header file changes 2025-01-04 11:08:01 -05:00
rtrFdback.c gcc11 -Wall -Wpedantic cleanup 2025-01-06 16:12:11 +00:00
rtrHazards.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
rtrMain.c Compatibility with C99 standard 2022-10-29 06:07:46 +02:00
rtrPaint.c Compatibility with C99 standard 2022-10-29 06:07:46 +02:00
rtrPin.c gcc11 -Wall -Wpedantic cleanup 2025-01-06 16:12:11 +00:00
rtrSide.c TCL9: ClientData macro assignment and access usage 2025-01-04 11:08:01 -05:00
rtrStem.c 17 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
rtrTech.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
rtrTravers.c Corrected issues in the extresist function found after the previous 2021-04-21 13:03:26 -04:00
rtrVia.c Compatibility with C99 standard 2022-10-29 06:07:46 +02:00
tclroute.c TCL9: Tcl_InitStubs(version="9.0") 2025-01-04 11:08:01 -05:00