suprmitf.c, uninitialized variable warning

This commit is contained in:
rlar 2011-06-30 16:33:10 +00:00
parent 6ab91f2e9f
commit 1041ecf8d0
2 changed files with 24 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2011-06-30 Robert Larice
* src/ciderlib/support/suprmitf.c :
suprmitf.c, uninitialized variable warning
2011-06-30 Robert Larice
* src/frontend/com_measure2.c :
com_measure2.c, uninitialized variable warning

View File

@ -202,11 +202,17 @@ SUPbinRead(char *inFile, float *x, float *conc, int *impId, int *numNod)
fclose( fpSuprem );
/* shift silicon layer to beginning of array */
for ( j=0; j < numLay; j++ ) {
if (matTyp[ j ] == 1) {
siIndex = j;
}
for ( j=numLay; --j >= 0; )
if (matTyp[ j ] == 1)
break;
if(j < 0) {
fprintf(stderr, "internal error in %s, bye !\n", __FUNCTION__);
exit(1);
}
siIndex = j;
offset = topNod[ siIndex ] - 1;
numGrid -= offset;
xStart = x[1 + offset];
@ -332,11 +338,17 @@ SUPascRead(char *inFile, float *x, float *conc, int *impId, int *numNod)
/* shift silicon layer to beginning of array */
for ( j=0; j < numLay; j++ ) {
if (matTyp[ j ] == 1) {
siIndex = j;
}
for ( j=numLay; --j >= 0; )
if (matTyp[ j ] == 1)
break;
if(j < 0) {
fprintf(stderr, "internal error in %s, bye !\n", __FUNCTION__);
exit(1);
}
siIndex = j;
offset = topNod[ siIndex ] - 1;
numGrid -= offset;
xStart = x[1 + offset];