set.c: warning: variable 'result' is used uninitialized
set.c:124:9: warning: variable 'result' is used uninitialized whenever 'if' condition is false clang18 -Wall warning cleanup [-Wsometimes-uninitialized]
This commit is contained in:
parent
ea41b21f67
commit
2f22ec6293
16
utils/set.c
16
utils/set.c
|
|
@ -101,7 +101,7 @@ SetNoisyBool(parm,valueS,file)
|
|||
char *valueS;
|
||||
FILE *file;
|
||||
{
|
||||
int n, which, result;
|
||||
int n, which, result = -2;
|
||||
|
||||
/* Bool string Table */
|
||||
static struct
|
||||
|
|
@ -145,15 +145,19 @@ SetNoisyBool(parm,valueS,file)
|
|||
}
|
||||
else
|
||||
{
|
||||
TxError("Unrecognized boolean value: \"%s\"\n", valueS);
|
||||
TxError("Valid values are: ");
|
||||
for (n = 0; boolStrings[n].bS_name; n++)
|
||||
TxError(" %s", boolStrings[n].bS_name);
|
||||
TxError("\n");
|
||||
result = -2;
|
||||
}
|
||||
}
|
||||
|
||||
if (result == -2)
|
||||
{
|
||||
TxError("Unrecognized boolean value: \"%s\"\n", valueS);
|
||||
TxError("Valid values are: ");
|
||||
for (n = 0; boolStrings[n].bS_name; n++)
|
||||
TxError(" %s", boolStrings[n].bS_name);
|
||||
TxError("\n");
|
||||
}
|
||||
|
||||
/* Print parm value */
|
||||
if(file)
|
||||
fprintf(file,"%8.8s ", *parm ? "YES" : "NO");
|
||||
|
|
|
|||
Loading…
Reference in New Issue