FIXME's from static analysis
This commit is contained in:
parent
f306e1c420
commit
e79d31853e
|
|
@ -202,7 +202,7 @@ int AllocatedSize;
|
||||||
Matrix->FillinsRemaining = 0;
|
Matrix->FillinsRemaining = 0;
|
||||||
|
|
||||||
RecordAllocation( Matrix, (void *)Matrix );
|
RecordAllocation( Matrix, (void *)Matrix );
|
||||||
if (Matrix->Error == spNO_MEMORY) goto MemoryError;
|
if (Matrix->Error == spNO_MEMORY) goto MemoryError; /* FIXME: Use of memory after free */
|
||||||
|
|
||||||
/* Take out the trash. */
|
/* Take out the trash. */
|
||||||
Matrix->TrashCan.Real = 0.0;
|
Matrix->TrashCan.Real = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ spFindElement(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register ElementPtr pElement;
|
register ElementPtr pElement;
|
||||||
int StartAt;
|
int StartAt = 0;
|
||||||
long int Min = LARGEST_LONG_INTEGER;
|
long int Min = LARGEST_LONG_INTEGER;
|
||||||
#define BorderRight 0 /* Start at left border, move right. */
|
#define BorderRight 0 /* Start at left border, move right. */
|
||||||
#define BorderDown 1 /* Start at top border, move down. */
|
#define BorderDown 1 /* Start at top border, move down. */
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ RealNumber Mult;
|
||||||
|
|
||||||
/* Update column. */
|
/* Update column. */
|
||||||
pColumn = Matrix->FirstInCol[Step];
|
pColumn = Matrix->FirstInCol[Step];
|
||||||
while (pColumn->Row < Step)
|
while (pColumn->Row < Step) /* FIXME: Access to Row results in dereference of NULL pointer */
|
||||||
{ pElement = Matrix->Diag[pColumn->Row];
|
{ pElement = Matrix->Diag[pColumn->Row];
|
||||||
pColumn->Real = Dest[pColumn->Row] * pElement->Real;
|
pColumn->Real = Dest[pColumn->Row] * pElement->Real;
|
||||||
while ((pElement = pElement->NextInCol) != NULL)
|
while ((pElement = pElement->NextInCol) != NULL)
|
||||||
|
|
@ -409,7 +409,7 @@ RealNumber Mult;
|
||||||
|
|
||||||
/* Update column. */
|
/* Update column. */
|
||||||
pColumn = Matrix->FirstInCol[Step];
|
pColumn = Matrix->FirstInCol[Step];
|
||||||
while (pColumn->Row < Step)
|
while (pColumn->Row < Step) /* FIXME: Access to Row results in dereference of NULL pointer */
|
||||||
{ pElement = Matrix->Diag[pColumn->Row];
|
{ pElement = Matrix->Diag[pColumn->Row];
|
||||||
Mult = (*pDest[pColumn->Row] *= pElement->Real);
|
Mult = (*pDest[pColumn->Row] *= pElement->Real);
|
||||||
while ((pElement = pElement->NextInCol) != NULL)
|
while ((pElement = pElement->NextInCol) != NULL)
|
||||||
|
|
@ -486,7 +486,7 @@ ComplexNumber Mult, Pivot;
|
||||||
|
|
||||||
/* Update column. */
|
/* Update column. */
|
||||||
pColumn = Matrix->FirstInCol[Step];
|
pColumn = Matrix->FirstInCol[Step];
|
||||||
while (pColumn->Row < Step)
|
while (pColumn->Row < Step) /* FIXME: Access to Row results in dereference of NULL pointer */
|
||||||
{ pElement = Matrix->Diag[pColumn->Row];
|
{ pElement = Matrix->Diag[pColumn->Row];
|
||||||
/* Cmplx expr: Mult = Dest[pColumn->Row] * (1.0 / *pPivot). */
|
/* Cmplx expr: Mult = Dest[pColumn->Row] * (1.0 / *pPivot). */
|
||||||
CMPLX_MULT(Mult, Dest[pColumn->Row], *pElement);
|
CMPLX_MULT(Mult, Dest[pColumn->Row], *pElement);
|
||||||
|
|
@ -524,7 +524,7 @@ ComplexNumber Mult, Pivot;
|
||||||
|
|
||||||
/* Update column. */
|
/* Update column. */
|
||||||
pColumn = Matrix->FirstInCol[Step];
|
pColumn = Matrix->FirstInCol[Step];
|
||||||
while (pColumn->Row < Step)
|
while (pColumn->Row < Step) /* FIXME: Access to Row results in dereference of NULL pointer */
|
||||||
{ pElement = Matrix->Diag[pColumn->Row];
|
{ pElement = Matrix->Diag[pColumn->Row];
|
||||||
/* Cmplx expr: Mult = *pDest[pColumn->Row] * (1.0 / *pPivot). */
|
/* Cmplx expr: Mult = *pDest[pColumn->Row] * (1.0 / *pPivot). */
|
||||||
CMPLX_MULT(Mult, *pDest[pColumn->Row], *pElement);
|
CMPLX_MULT(Mult, *pDest[pColumn->Row], *pElement);
|
||||||
|
|
@ -656,7 +656,7 @@ BOOLEAN *DoRealDirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
pColumn = Matrix->FirstInCol[Step];
|
pColumn = Matrix->FirstInCol[Step];
|
||||||
while (pColumn->Row < Step)
|
while (pColumn->Row < Step) /* FIXME: Access to Row results in dereference of NULL pointer */
|
||||||
{ pElement = Matrix->Diag[pColumn->Row];
|
{ pElement = Matrix->Diag[pColumn->Row];
|
||||||
Nm[Step]++;
|
Nm[Step]++;
|
||||||
while ((pElement = pElement->NextInCol) != NULL)
|
while ((pElement = pElement->NextInCol) != NULL)
|
||||||
|
|
@ -2530,7 +2530,7 @@ register ElementPtr pElement;
|
||||||
pElement = *ElementAboveRow2;
|
pElement = *ElementAboveRow2;
|
||||||
} while (pElement->Row < Row2);
|
} while (pElement->Row < Row2);
|
||||||
|
|
||||||
ElementBelowRow2 = Element2->NextInCol;
|
ElementBelowRow2 = Element2->NextInCol;/* FIXME: ElementBelowRow2 is never read */
|
||||||
|
|
||||||
/* Move Element2 to Row1. */
|
/* Move Element2 to Row1. */
|
||||||
*ElementAboveRow2 = Element2->NextInCol;
|
*ElementAboveRow2 = Element2->NextInCol;
|
||||||
|
|
@ -2675,7 +2675,7 @@ register ElementPtr pElement;
|
||||||
pElement = *ElementLeftOfCol2;
|
pElement = *ElementLeftOfCol2;
|
||||||
} while (pElement->Col < Col2);
|
} while (pElement->Col < Col2);
|
||||||
|
|
||||||
ElementRightOfCol2 = Element2->NextInRow;
|
ElementRightOfCol2 = Element2->NextInRow; /* FIXME: ElementRightOfCol2 is never read */
|
||||||
|
|
||||||
/* Move Element2 to Col1. */
|
/* Move Element2 to Col1. */
|
||||||
*ElementLeftOfCol2 = Element2->NextInRow;
|
*ElementLeftOfCol2 = Element2->NextInRow;
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ BOOLEAN Swapped, AnotherPassNeeded;
|
||||||
if (AnotherPassNeeded)
|
if (AnotherPassNeeded)
|
||||||
{ for (J = StartAt; NOT Swapped AND (J <= Size); J++)
|
{ for (J = StartAt; NOT Swapped AND (J <= Size); J++)
|
||||||
{ if (Matrix->Diag[J] == NULL)
|
{ if (Matrix->Diag[J] == NULL)
|
||||||
{ Twins = CountTwins( Matrix, J, &pTwin1, &pTwin2 );
|
{ Twins = CountTwins( Matrix, J, &pTwin1, &pTwin2 ); /* FIXME: Twins is never used */
|
||||||
SwapCols( Matrix, pTwin1, pTwin2 );
|
SwapCols( Matrix, pTwin1, pTwin2 );
|
||||||
Swapped = YES;
|
Swapped = YES;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue