magic/extract
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
..
ExtArray.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
ExtBasic.c ExtPerim.c: extEnumTilePerim() pass by-pointer const TileTypeBitMask* instead of by-value 2025-02-22 20:58:59 -05:00
ExtCell.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
ExtCouple.c ExtPerim.c: extEnumTilePerim() pass by-pointer const TileTypeBitMask* instead of by-value 2025-02-22 20:58:59 -05:00
ExtHard.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
ExtHier.c Modified behavior of the "property device" value. It was 2024-11-19 16:16:48 -05:00
ExtInter.c Corrected behavior of "load ... -dereference" to bring back a 2023-04-18 11:01:58 -04:00
ExtLength.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
ExtMain.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
ExtNghbors.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
ExtPerim.c ExtPerim.c: extEnumTilePerim() pass by-pointer const TileTypeBitMask* instead of by-value 2025-02-22 20:58:59 -05:00
ExtRegion.c Fixed another issue in which sticky labels on a non-electrical 2023-09-22 16:03:53 -04:00
ExtSubtree.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
ExtTech.c gcc11 -Wall -Wpedantic cleanup 2025-01-06 16:12:11 +00:00
ExtTest.c CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks 2025-02-22 21:02:49 -05:00
ExtTimes.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
ExtUnique.c ExtUnique.c: '_uq' directive writing 3 bytes into a region of size between 1 and 1024 2024-10-09 20:39:12 -04:00
ExtYank.c 42 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04: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
extDebugInt.h Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
extract.h ExtPerim.c: extEnumTilePerim() pass by-pointer const TileTypeBitMask* instead of by-value 2025-02-22 20:58:59 -05:00
extractInt.h Corrected the extraction offset, in which a parameter like "l" 2023-10-24 20:29:04 -04:00
extractInt.h.new Attempt to lighten up on the use of "fatal" referring to errors 2021-12-31 14:02:58 -05:00