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-09 21:34:12 -04:00
committed by Tim Edwards
parent 2f22ec6293
commit 2b06c8cee5
+1 -1
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;