From d229aefb15deb96044c83d03360841ae690aeb88 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sat, 29 Oct 2022 09:57:41 -0400 Subject: [PATCH] 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. --- VERSION | 2 +- calma/CalmaRead.c | 2 +- cif/CIFrdpoly.c | 1 + commands/CmdCD.c | 11 ++++++----- garouter/gaChannel.c | 2 +- graphics/grTOGL1.c | 1 + grouter/groutePen.c | 1 + utils/child.c | 2 -- utils/utils.h | 1 + 9 files changed, 13 insertions(+), 10 deletions(-) diff --git a/VERSION b/VERSION index e6431f71..54efe087 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.332 +8.3.333 diff --git a/calma/CalmaRead.c b/calma/CalmaRead.c index bb3b96ef..a920df9d 100644 --- a/calma/CalmaRead.c +++ b/calma/CalmaRead.c @@ -299,7 +299,7 @@ done: HashKill(&calmaDefInitHash); UndoEnable(); - if (calmaErrorFile != NULL) FCLOSE(calmaErrorFile); + if (calmaErrorFile != NULL) fclose(calmaErrorFile); } /* diff --git a/cif/CIFrdpoly.c b/cif/CIFrdpoly.c index edd79664..20377b47 100644 --- a/cif/CIFrdpoly.c +++ b/cif/CIFrdpoly.c @@ -21,6 +21,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #endif /* not lint */ #include +#include /* For qsort() */ #include "utils/magic.h" #include "utils/geometry.h" #include "tiles/tile.h" diff --git a/commands/CmdCD.c b/commands/CmdCD.c index b47352f6..f4056c63 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -130,7 +130,8 @@ CmdCalma(w, cmd) char **msg, *namep, *dotptr; char writeMode[3]; CellDef *rootDef; - FILE *f; + FILETYPE f; + FILE *fp; #ifdef HAVE_ZLIB gzFile fz; #endif @@ -966,19 +967,19 @@ outputCalma: { #endif - f = PaOpen(namep, "w", (dotptr == NULL) ? ".gds" : "", ".", (char *) NULL, (char **)NULL); - if (f == (FILE *)NULL) + fp = PaOpen(namep, "w", (dotptr == NULL) ? ".gds" : "", ".", (char *) NULL, (char **)NULL); + if (fp == (FILE *)NULL) { TxError("Cannot open %s%s to write GDS-II stream output\n", namep, (dotptr == NULL) ? ".gds" : ""); return; } - if (!CalmaWrite(rootDef, f)) + if (!CalmaWrite(rootDef, fp)) { TxError("I/O error in writing file %s.\n", namep); TxError("File may be incompletely written.\n"); } - (void) fclose(f); + (void) fclose(fp); #ifdef HAVE_ZLIB } diff --git a/garouter/gaChannel.c b/garouter/gaChannel.c index 786c8bed..718631d9 100644 --- a/garouter/gaChannel.c +++ b/garouter/gaChannel.c @@ -43,7 +43,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "debug/debug.h" /* C99 compat */ -#include "gaRouter/gaInternal.h" +#include "garouter/gaInternal.h" /* List of all active channels */ GCRChannel *gaChannelList = NULL; diff --git a/graphics/grTOGL1.c b/graphics/grTOGL1.c index a260672c..509a47ca 100644 --- a/graphics/grTOGL1.c +++ b/graphics/grTOGL1.c @@ -1337,6 +1337,7 @@ GrTOGLLower(w) #ifdef CAIRO_OFFSCREEN_RENDER extern void GrTCairoLock(); +extern void GrTCairoUnlock(); extern void TCairoOffScreen(); #endif diff --git a/grouter/groutePen.c b/grouter/groutePen.c index f02d4b38..35126bc9 100644 --- a/grouter/groutePen.c +++ b/grouter/groutePen.c @@ -22,6 +22,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #endif /* lint */ #include +#include /* For qsort() */ #include "utils/magic.h" #include "utils/geometry.h" #include "utils/hash.h" diff --git a/utils/child.c b/utils/child.c index 734a6eb5..fc5c97b3 100644 --- a/utils/child.c +++ b/utils/child.c @@ -10,9 +10,7 @@ *************************************************************************/ #include #include -#ifndef SYSV #include -#endif /* SYSV */ #include #include "utils/utils.h" diff --git a/utils/utils.h b/utils/utils.h index 1455f57f..0a3aa4fd 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -25,6 +25,7 @@ #include #endif +#include "utils/tech.h" #include "utils/magic.h" /*