All naked access to `ti_client` now uses the function-like-macro
to encapsulate this action. This macro existed before this just
makes all sites utilize it.
Added additional INT and PTR variants to remove the programmer
load on thinking about casing and casts polluting the point
of use. So the use now looks cleaner.
Equivalent prototypes:
void TiSetClient(Tile*, ClientData)
void TiSetClientINT(Tile*, intptr_t) /* pointertype */
void TiSetClientPTR(Tile*, void*)
ClientData TiGetClient(Tile*)
intptr_t TiGetClientINT(Tile*) /* pointertype */
void *TiGetClientPTR(Tile*)
Unclear with all the flip operations if there is some kind of attachment
(exchange of channels), the other 2 channels created in the function
are also cleaned up.
Maybe it was a single bit and '!' operator inverted a single bit, but it
appears to be a 4-bit mask today.
TODO check rtrMARKED() this looks like it uses '&' operator is in use
but from the context of a bitmask maybe this should be '|' operator.
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.
gaStem.c:225:9: warning: suggest parentheses around assignment used as truth value
gaStem.c:350:9: warning: suggest parentheses around assignment used as truth value
grouteMain.c:363:12: warning: suggest parentheses around assignment used as truth value
grouteMaze.c:573:17: warning: suggest parentheses around assignment used as truth value
groutePath.c:127:13: warning: suggest parentheses around assignment used as truth value
irCommand.c:901:12: warning: suggest parentheses around assignment used as truth value
irCommand.c:999:12: warning: suggest parentheses around assignment used as truth value
irCommand.c:1275:13: warning: suggest parentheses around assignment used as truth value
irCommand.c:1375:13: warning: suggest parentheses around assignment used as truth value
irCommand.c:1931:17: warning: suggest parentheses around assignment used as truth value
rtrDcmpose.c:435:12: warning: suggest parentheses around assignment used as truth value
rtrPin.c:174:17: warning: suggest parentheses around assignment used as truth value
rtrStem.c:373:21: warning: suggest parentheses around assignment used as truth value
rtrStem.c:479:9: warning: suggest parentheses around assignment used as truth value
rtrStem.c:952:17: warning: suggest parentheses around assignment used as truth value
gcrInit.c:239:9: warning: suggest parentheses around assignment used as truth value
net2ir.c:123:13: warning: suggest parentheses around assignment used as truth value
GCC14 -Wall cleanup series [-Wparentheses]
Fix code scanning alert no. 156: Incorrect return-value check for a 'scanf'-like function (#6)
* Create codeql.yml
* Fix code scanning alert no. 156: 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>
This commit makes the code (mostly) C99-compatible, enabling to compile
it without the -Wno-error=implicit-function-declaration flag. This
way, Magic becomes usable on arm64 architectures, specifically on Apple
computers with M1/M2 SoC.
commit, mostly relating to the scale of values in the ".nodes" file
produced by ext2sim. Making this file CIF syntax seemed unnecessary,
so I removed the CIF syntax and scaling. "extresist" can now produce
an apparently valid output on a standard cell layout. Even with the
change, the extresist output is still only pseudo-hierarchical, so
this does not preclude the need for eliminating the .sim format file
in favor of the .ext file, but it provides a working intermediate
form.
Conflicts:
VERSION
Merged recent changes from master back into bplane, as the efficiency of
bplane for doing extraction on large layouts is unquestionably better.
Fixed the implementation of DBMoveCell() for bplane. Corrected an error
in the bplane version of dbScaleCell() that enumerates cell uses but
does not free the list.
Conflicts:
VERSION
calma/Depend
cif/Depend
cmwind/Depend
commands/Depend
database/Depend
dbwind/Depend
debug/Depend
drc/Depend
ext2sim/Depend
ext2spice/Depend
extflat/Depend
extract/Depend
garouter/Depend
gcr/Depend
graphics/Depend
grouter/Depend
irouter/Depend
lef/Depend
lisp/Depend
mzrouter/Depend
netmenu/Depend
plot/Depend
plow/Depend
resis/Depend
router/Depend
select/Depend
sim/Depend
tcltk/Depend
textio/Depend
tiles/Depend
utils/Depend
windows/Depend
wiring/Depend
Merged recent changes from master branch into bplane branch. Testing the
bplane implementation which has about a 5x improvement in extraction times
for large layouts, which is significant enough to move ahead with the bplane
implementation; however, the bplane implementation has not been thoroughly
vetted yet, so it will remain a branch until such time that it has been
validated.
the compiler. Some are obscure functions (plot verstatec hasn't
been used in years) but others (like SPICE distributed junctions)
are potentially significant sources of unexpected crashes on
systems that don't zero uninitialized memory.