Commit Graph

9 Commits

Author SHA1 Message Date
Darryl L. Miles 07f9bbe1fb gcc11 -Wall -Wpedantic cleanup 2025-01-06 16:12:11 +00:00
Darryl L. Miles be09edb8d8 12 x warning: suggest parentheses around '&&' within '||'
The '&' has higher precedence, so the expression of the '&' side receive
extra parentheses.

ResMakeRes.c:671:37: warning: suggest parentheses around '&&' within '||'
ResMakeRes.c:942:32: warning: suggest parentheses around '&&' within '||'
ResSimple.c:201:70: warning: suggest parentheses around '&&' within '||'
ResRex.c:1036:28: warning: suggest parentheses around '&&' within '||'
ResRex.c:1038:50: warning: suggest parentheses around '&&' within '||'
ext2sim.c:1341:47: warning: suggest parentheses around '&&' within '||'
ext2spice.c:172:44: warning: suggest parentheses around '&&' within '||'
ext2spice.c:173:49: warning: suggest parentheses around '&&' within '||'
ext2spice.c:3655:50: warning: suggest parentheses around '&&' within '||'
ext2hier.c:1412:50: warning: suggest parentheses around '&&' within '||'
gcrDebug.c:638:55: warning: suggest parentheses around '&&' within '||'
selEnum.c:323:28: warning: suggest parentheses around '&&' within '||'

GCC14 -Wall cleanup series [-Wparentheses]
2024-10-09 21:12:55 -04:00
Darryl L. Miles 8b2efd5d7d gcr/gcrDebug.c Opened stream never closed. Potential resource leak
A false positive in practice, made clearer by using a 2nd variable
with attention drawing name.

SonarCloud
gcr/gcrDebug.c:429 Opened stream never closed. Potential resource leak
https://sonarcloud.io/project/issues?open=AZJB17OzNGfDNup0Rj-t&id=dlmiles_magic
2024-10-01 12:36:13 -04:00
Darryl L. Miles a0aea2aa2e gcr/gcrDebug.c Add a field width specifier to this "%s" placeholder.
Unbounded local buffer used in fscanf() string extraction call.
Add width to specified to ensure truncation as 24 character instead
of buffer overflow.

SonarCloud https://sonarcloud.io/project/issues?open=AZJB17OzNGfDNup0Rj9x&id=dlmiles_magic
2024-10-01 12:36:13 -04:00
Darryl Miles 4ddd0624cb gcr/gcrDebug.c: Wrong type of arguments to formatting function
Fix code scanning alert no. 97: Wrong type of arguments to formatting function (#41)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-10-01 12:36:13 -04:00
Darryl L. Miles fc20977fa5 gcr/gcrDebug.c: (intmax_t) %ld Wrong type of arguments to formatting function
Mutiple items per line.

CodeQL: https://github.com/dlmiles/magic/security/code-scanning/87
2024-10-01 12:36:13 -04:00
Darryl Miles 96c7e283c0 gcr/gcrDebug.c: Incorrect return-value check for a 'scanf'-like function
Fix code scanning alert no. 137: Incorrect return-value check for a 'scanf'-like function (#9)

* Create codeql.yml

* Fix code scanning alert no. 137: Incorrect return-value check for a 'scanf'-like function

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-10-01 12:36:12 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00