]> git.sur5r.net Git - cc65/commitdiff
Initialize variables to avoid compiler warnings.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 3 Jul 2011 12:24:54 +0000 (12:24 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 3 Jul 2011 12:24:54 +0000 (12:24 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5070 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/dbginfo/dbginfo.c

index 7865f53a46a09ad5a02c8ddb0eb5ac9b1bed4ddf..80c6600a99aa0df695cc02520f0a333873a6450a 100644 (file)
@@ -1039,7 +1039,7 @@ static int CompareFileInfoById (const void* L, const void* R)
 
 
 
-static SymInfo* NewSymInfo (const StrBuf* Name, long Val, 
+static SymInfo* NewSymInfo (const StrBuf* Name, long Val,
                             cc65_symbol_type Type, cc65_size Size,
                             unsigned Segment)
 /* Create a new SymInfo struct, intialize and return it */
@@ -1483,7 +1483,7 @@ static void UnknownKeyword (InputData* D)
     /* Output a warning */
     ParseError (D, CC65_WARNING, "Unknown keyword \"%s\" - skipping",
                 SB_GetConstBuf (&D->SVal));
-                            
+
     /* Skip the identifier */
     NextToken (D);
 
@@ -2230,9 +2230,12 @@ ErrorExit:
 
 static void ParseSym (InputData* D)
 /* Parse a SYM line */
-{
-    cc65_symbol_type    Type;
-    long                Value;
+{                                                                 
+    /* Most of the following variables are initialized with a value that is
+     * overwritten later. This is just to avoid compiler warnings.
+     */
+    cc65_symbol_type    Type = CC65_SYM_EQUATE;
+    long                Value = 0;
     cc65_size           Size = 0;
     StrBuf              SymName = STRBUF_INITIALIZER;
     unsigned            Segment = CC65_INV_ID;