gaStem.c: warning: variable '...' is used uninitialized
An error return indication was added, as there as no other way to abort execution but indicate to caller the data was not filled in. No call sites have been modified to check the error return as the assertion is still in place and expects to catch this unexpected scenario. gaStem.c:914:2: warning: variable 'start' is used uninitialized whenever switch default is taken gaStem.c:914:2: warning: variable 'min' is used uninitialized whenever switch default is taken gaStem.c:914:2: warning: variable 'max' is used uninitialized whenever switch default is taken clang18 -Wall warning cleanup [-Wsometimes-uninitialized]
This commit is contained in:
parent
38c14a0ad9
commit
d5ef80acda
|
|
@ -84,7 +84,7 @@ int gaNumSimplePaint, gaNumMazePaint, gaNumExtPaint;
|
|||
/* Forward declarations */
|
||||
int gaStemContainingChannelFunc();
|
||||
bool gaStemAssign();
|
||||
void gaStemGridRange();
|
||||
int gaStemGridRange();
|
||||
void gaStemPaint();
|
||||
bool gaStemNetClear();
|
||||
bool gaStemInternalFunc();
|
||||
|
|
@ -869,7 +869,7 @@ gaStemNetClear(termArea, point, side, netList)
|
|||
* of 'r'.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
* 0 on success, -1 on error (no side effects).
|
||||
*
|
||||
* Side effects:
|
||||
* Sets *pMinGrid, *pMaxGrid, and *pStart.
|
||||
|
|
@ -877,7 +877,7 @@ gaStemNetClear(termArea, point, side, netList)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
int
|
||||
gaStemGridRange(type, r, pMinGrid, pMaxGrid, pStart)
|
||||
int type;
|
||||
Rect *r;
|
||||
|
|
@ -914,7 +914,7 @@ gaStemGridRange(type, r, pMinGrid, pMaxGrid, pStart)
|
|||
default:
|
||||
{
|
||||
ASSERT(FALSE, "Bad channel type in gaStemGridRange");
|
||||
break;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
max = MAX(max, start);
|
||||
|
|
@ -922,6 +922,7 @@ gaStemGridRange(type, r, pMinGrid, pMaxGrid, pStart)
|
|||
*pMaxGrid = max;
|
||||
*pMinGrid = min;
|
||||
*pStart = start;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue