From d74e43f0f0d73c72b719ed1235fccb7ef7fc1f5d Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 4 Jul 2023 12:07:41 +0200 Subject: [PATCH] Move extern declaration to the top, out of any function. Thus remove VC2022 compiler warnings. --- src/ciderlib/oned/onedest.c | 3 ++- src/ciderlib/oned/onemesh.c | 2 +- src/ciderlib/twod/twodest.c | 3 ++- src/ciderlib/twod/twomesh.c | 2 +- src/main.c | 4 +++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/ciderlib/oned/onedest.c b/src/ciderlib/oned/onedest.c index cc19c1acf..56a544ed2 100644 --- a/src/ciderlib/oned/onedest.c +++ b/src/ciderlib/oned/onedest.c @@ -12,6 +12,8 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "onedext.h" #include "oneddefs.h" +extern void CiderLoaded(int); + void ONEdestroy(ONEdevice *pDevice) { @@ -86,7 +88,6 @@ ONEdestroy(ONEdevice *pDevice) FREE(pDevice); { - extern void CiderLoaded(int); CiderLoaded(-1); } } diff --git a/src/ciderlib/oned/onemesh.c b/src/ciderlib/oned/onemesh.c index 62766e7f0..45f8fc911 100644 --- a/src/ciderlib/oned/onemesh.c +++ b/src/ciderlib/oned/onemesh.c @@ -12,6 +12,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "onedext.h" #include "oneddefs.h" +extern void CiderLoaded(int); /* Forward Declarations */ /* static void ONEresetEvalFlag(ONEdevice *); sjb - not used */ @@ -195,7 +196,6 @@ ONEbuildMesh(ONEdevice *pDevice, ONEcoord *pCoord, ONEdomain *pDomain, FREE(nodeArray); { - extern void CiderLoaded(int); CiderLoaded(1); } diff --git a/src/ciderlib/twod/twodest.c b/src/ciderlib/twod/twodest.c index 35c7ecf9a..232c39867 100644 --- a/src/ciderlib/twod/twodest.c +++ b/src/ciderlib/twod/twodest.c @@ -12,6 +12,8 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "twoddefs.h" #include "twodext.h" +extern void CiderLoaded(int); + void TWOdestroy(TWOdevice *pDevice) { @@ -108,7 +110,6 @@ TWOdestroy(TWOdevice *pDevice) FREE( pDevice ); { - extern void CiderLoaded(int); CiderLoaded(-1); } } diff --git a/src/ciderlib/twod/twomesh.c b/src/ciderlib/twod/twomesh.c index cbc058346..4eddd4d87 100644 --- a/src/ciderlib/twod/twomesh.c +++ b/src/ciderlib/twod/twomesh.c @@ -19,6 +19,7 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group static void doMobCoeffs(TWOelem *, int); static void resetEvalFlag(TWOdevice *pDevice); +extern void CiderLoaded(int); void TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain, @@ -459,7 +460,6 @@ TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain, FREE(edgeArrayH); { - extern void CiderLoaded(int); CiderLoaded(1); } /* diff --git a/src/main.c b/src/main.c index 3c36990cc..653d3ddcb 100644 --- a/src/main.c +++ b/src/main.c @@ -107,6 +107,8 @@ FILE *flogp = NULL; /* log file ('-o logfile' command line option) */ bool orflag = FALSE; /* global for -o option */ #endif +extern int IsCiderLoaded(void); + FILE *slogp = NULL; /* soa log file ('--soa-log file' command line option) */ /* Frontend and circuit options */ @@ -535,7 +537,7 @@ sp_shutdown(int exitval) { #ifdef CIDER { - extern int IsCiderLoaded(void); + char *cider_quit_s = NULL; bool cider_com_quit = TRUE; if (exitval != EXIT_BAD) {