CalmaRdcl.c: warning: variable 'rtype' is used uninitialized

FEOF condition of PEEKRH causes variable to possibly not get
initialized before use.

CalmaRdcl.c:372:5: warning: variable 'rtype' is used uninitialized whenever 'if' condition is true

clang18 -Wall warning cleanup [-Wsometimes-uninitialized]
This commit is contained in:
Darryl L. Miles 2024-10-04 19:52:52 +01:00 committed by Tim Edwards
parent 2f22ec6293
commit 2b06c8cee5
1 changed files with 1 additions and 1 deletions

View File

@ -351,7 +351,7 @@ calmaParseStructure(filename)
char *filename; /* Name of the GDS file read */
{
static int structs[] = { CALMA_STRCLASS, CALMA_STRTYPE, -1 };
int nbytes, rtype, nsrefs, osrefs, npaths;
int nbytes = -1, rtype = 0, nsrefs, osrefs, npaths;
char *strname = NULL;
HashEntry *he;
int timestampval = 0;