Commit Graph

20 Commits

Author SHA1 Message Date
Darryl L. Miles d55a2b74ac header file #ifndef guard namespace consistency (global change)
This add an effective namespace prefix to the guard ifndef
2025-07-29 10:50:32 -04:00
Darryl L. Miles 5e17855f31 header file #ifndef guard presence consistency 2025-07-29 10:50:32 -04:00
Darryl L. Miles 8b7e0aaec6 Makefile: whitespace only change 2025-07-29 10:50:32 -04:00
Darryl L. Miles 6db34b6aa9 gaMazeRoute() pass by-pointer const TileTypeBitMask* instead of by-value
sizeof(TileTypeBitMask) == 32
2025-02-22 20:58:59 -05:00
Darryl L. Miles 14b6453707 LookupStruct() constify call-site
irouter/irTestCmd.c: LookupStruct() constify call-site
irouter/irCommand.c: LookupStruct() constify call-site
mzrouter/mzTestCmd.c: LookupStruct() constify call-site
mzrouter/mzTech.c: LookupStruct() constify call-site
router/rtrCmd.c: LookupStruct() constify call-site
plow/PlowTest.c: LookupStruct() constify call-site
plow/PlowTech.c: LookupStruct() constify call-site
plot/plotVers.c: LookupStruct() constify call-site
grouter/grouteTest.c: LookupStruct() constify call-site
garouter/gaTest.c: LookupStruct() constify call-site
extract/ExtTest.c: LookupStruct() constify call-site
extract/ExtTech.c: LookupStruct() constify call-site
extflat/EFread.c: LookupStruct() constify call-site
DRCtech.c: LookupStruct() constify call-site
debugFlags.c: LookupStruct() constify call-site
CmdSubrs.c: LookupStruct() constify call-site
geometry.c: LookupStruct() constify call-site
set.c: LookupStruct() constify call-site
2024-12-26 15:20:58 -05:00
Darryl L. Miles bbe447423b gaStem.c: type, The left operand of '==' is a garbage value
Theoretical use of unintialized data.

Added 'default' case into switch to throw ASSERT(), otherwise
when assertions disabled treat consistently as GEO_NORTH.

SonarCloud
The left operand of '==' is a garbage value
https://sonarcloud.io/project/issues?open=AZJB17fSNGfDNup0Rkoh&id=dlmiles_magic
2024-12-26 13:01:24 -05:00
Darryl L. Miles d5ef80acda gaStem.c: warning: variable '...' is used uninitialized
An error return indication was added, as there as no other way to abort
execution but indicate to caller the data was not filled in.

No call sites have been modified to check the error return as the
assertion is still in place and expects to catch this unexpected scenario.

gaStem.c:914:2: warning: variable 'start' is used uninitialized whenever switch default is taken
gaStem.c:914:2: warning: variable 'min' is used uninitialized whenever switch default is taken
gaStem.c:914:2: warning: variable 'max' is used uninitialized whenever switch default is taken

clang18 -Wall warning cleanup [-Wsometimes-uninitialized]
2024-10-09 21:34:12 -04:00
Darryl L. Miles 38c14a0ad9 gaMain.c: warning: variable 'errs' is used uninitialized
gaMain.c:287:9: warning: variable 'errs' is used uninitialized whenever 'if' condition is true

clang18 -Wall warning cleanup [-Wsometimes-uninitialized]
2024-10-09 21:34:12 -04:00
Darryl L. Miles 4bfed56924 17 x warning: suggest parentheses around assignment used as truth value
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]
2024-10-09 21:12:55 -04:00
Darryl L. Miles 967b41343b GCC14: warning: missing braces around initializer
GCC14 -Wall cleanup series [-Wmissing-braces]
2024-10-09 21:12:55 -04:00
Tim Edwards dba6f99d93 Updated the revision number to go along with the merge of pull
request #325 from Daryl Miles.  Made a few simple style changes
to conform to (what is vaguely defined as) the overall programming
style for magic (passed down from John Ousterhout).
2024-10-01 12:56:31 -04:00
Darryl L. Miles a9b707460b garouter/gaChannel.c use of unintialized or incorrect variable
This resolution assumes that all records and values of ch->gcr_type are expected
to be one of the 3 cases in the switch.  The bug it on the first iteration it is
possible 'tot' and 'clear' is just not initializaed and on a subsequent iteration
it is possible it ot setup to the previous interation values.

SonarCloud
garouter/gaChannel.c:385:3rd function call argument is an uninitialized value
https://sonarcloud.io/project/issues?open=AZJB17fFNGfDNup0RkoE&id=dlmiles_magic
2024-10-01 12:36:13 -04:00
Tim Edwards d229aefb15 A handful of changes after applying pull request #191 from
Alessandro De Laurenzis.  That pull request cleaned up the vast
majority of compiler warnings.  However, that cleanup exposed a
few additional warnings pointing to errors in the code that needed
fixing.  The code now compiles cleanly except for one warning
about redefined CAD_DIR that I have not looked into.
2022-10-29 09:57:41 -04:00
Alessandro De Laurenzis b306a39560 Compatibility with C99 standard
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.
2022-10-29 06:07:46 +02:00
Tim Edwards 2d79e0e0ce Corrected variables that set the PaintPlane routine, which had been
changed from returning void to returning int without changing the
type of the variable, thus causing a compiler warning.
2021-02-18 15:47:40 -05:00
Tim Edwards e53a23de59 Added an "off-grid geometry" check, in two versions. The simple
one is an "off_grid" DRC type, which can be used to check geometry
that is below the manufacturing grid.  Normally magic prevents the
grid from being subdivided below the manufacturing grid, but this
limit can be removed and replaced by DRC checks to check for such
errors in a GDS file of unknown origin.  The second version looks
for interactions between subcells that end up with intersections
of non-manhattan geometry landing on points that are not on the
database internal grid.  Such errors cannot be seen by magic's DRC
engine by definition, and so must be detected while flattening
geometry for the DRC checks.
2021-02-04 17:35:43 -05:00
Tim Edwards 7dfe407787 Implemented a return value for the cell read-in checks with an option
to stop the search whenever a cell is not found.  Used this to implement
a new option for GDS writes, "gds undefined allow|disallow" (default
"disallow") controls whether or not GDS with undefined references will
be allowed to be written.  Similarly affects CIF and LEF writes, extraction,
and DRC (when running "drc check" from the top).
2021-01-14 15:21:39 -05:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 80fa495103 Removed the Depend files, which were being tracked with .gitignore
pointing to Depend instead of */Depend.
2020-03-13 15:39:08 -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