cleanup few warnings

This commit is contained in:
dwarning 2023-06-08 15:01:20 +02:00
parent 5903e71338
commit 65cc6fdea4
3 changed files with 21 additions and 4 deletions

View File

@ -137,7 +137,7 @@ spPrint(
{ {
register int J = 0; register int J = 0;
int I, Row, Col, Size, Top, StartCol = 1, StopCol, Columns, ElementCount = 0; int I, Row, Col, Size, Top, StartCol = 1, StopCol, Columns, ElementCount = 0;
double Magnitude, SmallestDiag, SmallestElement; double Magnitude, SmallestDiag = 0.0, SmallestElement = 0.0;
double LargestElement = 0.0, LargestDiag = 0.0; double LargestElement = 0.0, LargestDiag = 0.0;
ElementPtr pElement; ElementPtr pElement;
#if spCOMPLEX #if spCOMPLEX

View File

@ -96,6 +96,8 @@
#define NO 0 #define NO 0
#define YES 1 #define YES 1
#define NG_IGNORE(x) (void)x
typedef spREAL *RealVector; typedef spREAL *RealVector;
static void LoadGmin(MatrixPtr Matrix, double Gmin); static void LoadGmin(MatrixPtr Matrix, double Gmin);
@ -153,6 +155,8 @@ SMPcLUfac(
SMPmatrix *Matrix, SMPmatrix *Matrix,
double PivTol) double PivTol)
{ {
NG_IGNORE(PivTol);
spSetComplex( Matrix ); spSetComplex( Matrix );
return spFactor( Matrix ); return spFactor( Matrix );
} }
@ -166,6 +170,8 @@ SMPluFac(
SMPmatrix *Matrix, SMPmatrix *Matrix,
double PivTol, double Gmin) double PivTol, double Gmin)
{ {
NG_IGNORE(PivTol);
spSetReal( Matrix ); spSetReal( Matrix );
LoadGmin( Matrix, Gmin ); LoadGmin( Matrix, Gmin );
return spFactor( Matrix ); return spFactor( Matrix );
@ -208,6 +214,9 @@ SMPcaSolve(
SMPmatrix *Matrix, SMPmatrix *Matrix,
double RHS[], double iRHS[], double Spare[], double iSpare[]) double RHS[], double iRHS[], double Spare[], double iSpare[])
{ {
NG_IGNORE(Spare);
NG_IGNORE(iSpare);
#if spCOMPLEX #if spCOMPLEX
spSolveTransposed( Matrix, RHS, RHS, iRHS, iRHS ); spSolveTransposed( Matrix, RHS, RHS, iRHS, iRHS );
#else #else
@ -223,6 +232,9 @@ SMPcSolve(
SMPmatrix *Matrix, SMPmatrix *Matrix,
double RHS[], double iRHS[], double Spare[], double iSpare[]) double RHS[], double iRHS[], double Spare[], double iSpare[])
{ {
NG_IGNORE(Spare);
NG_IGNORE(iSpare);
#if spCOMPLEX #if spCOMPLEX
spSolve( Matrix, RHS, RHS, iRHS, iRHS ); spSolve( Matrix, RHS, RHS, iRHS, iRHS );
#else #else
@ -238,6 +250,8 @@ SMPsolve(
SMPmatrix *Matrix, SMPmatrix *Matrix,
double RHS[], double Spare[]) double RHS[], double Spare[])
{ {
NG_IGNORE(Spare);
#if spCOMPLEX #if spCOMPLEX
spSolve( Matrix, RHS, RHS, (spREAL*)NULL, (spREAL*)NULL ); spSolve( Matrix, RHS, RHS, (spREAL*)NULL, (spREAL*)NULL );
#else #else
@ -264,6 +278,8 @@ SMPmatrix **pMatrix,
int dummy) int dummy)
{ {
int Error; int Error;
NG_IGNORE(dummy);
*pMatrix = (SMPmatrix *)spCreate( 0, 1, &Error ); *pMatrix = (SMPmatrix *)spCreate( 0, 1, &Error );
return Error; return Error;
} }
@ -309,8 +325,11 @@ SMPprintRHS(SMPmatrix *Matrix, char *Filename, RealVector RHS, RealVector iRHS)
void void
SMPprint( SMPprint(
SMPmatrix *Matrix, SMPmatrix *Matrix,
char *File) char *Filename)
{ {
if (Filename)
spFileMatrix(Matrix, Filename, "Circuit Matrix", 0, 1, 1 );
else
spPrint( Matrix, 0, 1, 1 ); spPrint( Matrix, 0, 1, 1 );
} }

View File

@ -50,7 +50,6 @@ int size = Matrix->Size;
return; return;
#endif #endif
#if REAL
for (I = 1; I <= size; I++) { for (I = 1; I <= size; I++) {
pElement = Matrix->FirstInRow[I]; pElement = Matrix->FirstInRow[I];
while (pElement != NULL) while (pElement != NULL)
@ -59,5 +58,4 @@ int size = Matrix->Size;
} }
} }
return; return;
#endif /* REAL */
} }