]> git.sur5r.net Git - cc65/blobdiff - src/co65/o65.c
Replace tabs by spaces in file lists.
[cc65] / src / co65 / o65.c
index 976e23a70e11f7f956d6af9d971a55ecad19bb3f..a30b18d00f9989406d6f82e31b6d5f8e81b0ffdf 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2002-2003 Ullrich von Bassewitz                                       */
+/* (C) 2002-2004 Ullrich von Bassewitz                                       */
 /*               Römerstrasse 52                                             */
 /*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
@@ -86,11 +86,13 @@ static unsigned long ReadO65Size (FILE* F, const O65Header* H)
  * header) from the o65 file.
  */
 {
+    unsigned long Size = 0;     /* Initialize to avoid warnings */
     switch (H->mode & O65_SIZE_MASK) {
-        case O65_SIZE_32BIT:    return Read32 (F);
-        case O65_SIZE_16BIT:    return Read16 (F);
+        case O65_SIZE_32BIT:    Size = Read32 (F);      break;
+        case O65_SIZE_16BIT:    Size = Read16 (F);      break;
         default:                Internal ("Invalid size field value in o65 header");
     }
+    return Size;
 }
 
 
@@ -187,7 +189,8 @@ static O65Import* ReadO65Import (FILE* F)
     do {
         C = Read8 (F);
         if (Len >= sizeof (Buf)) {
-            Error ("Imported identifier exceeds maximum size (%u)", sizeof (Buf));
+            Error ("Imported identifier exceeds maximum size (%u)",
+                   (unsigned) sizeof (Buf));
         }
         Buf[Len++] = C;
     } while (C != '\0');
@@ -281,7 +284,8 @@ static O65Export* ReadO65Export (FILE* F, const O65Header* H)
     do {
         C = Read8 (F);
         if (Len >= sizeof (Buf)) {
-            Error ("Exported identifier exceeds maximum size (%u)", sizeof (Buf));
+            Error ("Exported identifier exceeds maximum size (%u)",
+                   (unsigned) sizeof (Buf));
         }
         Buf[Len++] = C;
     } while (C != '\0');