Closed jburguete closed 2 years ago
@jburguete thanks for finding these warnings. I assume you found them by compiling the project's master branch. However to fix them, changes should be made to a new branch created off of dev
and then have that new branch merged into dev
. Please follow the instructions in the CONTRIBUTING section of the project's README.
Also I reviewed your proposed changes and agree with all but the last. I don't see any place in smatrix.c where the variable sm
is declared but not used.
Thank you @jburguete , can we close this PR in light of #674?
Yes, of course. Sorry, it is my first pull request and I am not jet familiarized with the interfaces
No worries, thank you!
Several GCC compiler warnings indicate possible issues in the code.
diff -Naur src/epanet.c src2/epanet.c --- src/epanet.c 2022-03-28 20:24:51.756202697 +0200 +++ src2/epanet.c 2022-03-31 18:02:55.219740205 +0200 @@ -4019,6 +4019,7 @@ if (curveIndex < 0 || curveIndex > net->Ncurves) return 206; Link[index].Kc = curveIndex; }
break;
default: return 251; diff -Naur src/genmmd.c src2/genmmd.c --- src/genmmd.c 2022-03-28 20:24:51.756202697 +0200 +++ src2/genmmd.c 2022-04-01 08:37:33.129658819 +0200 @@ -10,7 +10,7 @@ int delta, int dhead, int qsize, int llist, int marker, int maxint, int* nofsub);
-static int mmdint(int neqns, int xadj, int adjncy, int dhead, int* dforw, +static int mmdint(int neqns, int xadj, int dhead, int dforw, int dbakw, int qsize, int llist, int marker); static int mmdelm(int mdnode, int xadj, int adjncy, int dhead, int dforw, int dbakw, int qsize, int llist, int marker, @@ -110,7 +110,7 @@ nofsub = 0; //mmdint(neqns, &xadj[1], &adjncy[1], &dhead[1], &invp[1], &perm[1], // &qsize[1], &llist[1], &marker[1]);
mmdint_(neqns, xadj, dhead, invp, perm, qsize, llist, marker);
/ ---------------------------------------------- / / NUM COUNTS THE NUMBER OF ORDERED NODES PLUS 1. / @@ -258,7 +258,7 @@ /* *** */
-static int mmdint(int neqns, int xadj, int adjncy, int dhead, int* dforw, +static int mmdint(int neqns, int xadj, int dhead, int dforw, int dbakw, int qsize, int llist, int marker) { / System generated locals / diff -Naur src/hydsolver.c src2/hydsolver.c --- src/hydsolver.c 2022-03-28 20:24:51.756202697 +0200 +++ src2/hydsolver.c 2022-04-01 08:46:46.802593514 +0200 @@ -320,7 +320,7 @@ s = hyd->LinkStatus[k]; if (link->Type == PIPE) {
else if (hyd->LinkSetting[k] == MISSING && s != (char) net->Control[i].Status) { change = 1; } diff -Naur src/input3.c src2/input3.c --- src/input3.c 2022-03-28 20:24:51.756202697 +0200 +++ src2/input3.c 2022-04-02 18:19:01.244936469 +0200 @@ -810,7 +810,7 @@ }
// Otherwise add new demand to junction
diff -Naur src/quality.c src2/quality.c --- src/quality.c 2022-03-28 20:24:51.756202697 +0200 +++ src2/quality.c 2022-04-01 08:42:53.262206122 +0200 @@ -69,10 +69,10 @@
if (errcode) return errcode;
if ((errcode = unlinked(pr))) return errcode; }
// Create a memory pool for water quality segments diff -Naur src/smatrix.c src2/smatrix.c --- src/smatrix.c 2022-03-28 20:24:51.760202712 +0200 +++ src2/smatrix.c 2022-03-31 17:55:47.146044385 +0200 @@ -487,7 +487,6 @@ / { Network net = &pr->network;
Smatrix *sm = &pr->hydraul.smatrix;
int node; Padjlist alink;