From 2b06c8cee56cf323f108e1e489787b5fdfa593eb Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Fri, 4 Oct 2024 19:52:52 +0100 Subject: [PATCH] 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] --- calma/CalmaRdcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calma/CalmaRdcl.c b/calma/CalmaRdcl.c index ab93664b..c5e014b0 100644 --- a/calma/CalmaRdcl.c +++ b/calma/CalmaRdcl.c @@ -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;