Fixed some Sun Studio warnings about unreachable code.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 13 Apr 2009 03:40:30 -0400
changeset 986 e69d37f80ce2
parent 985 dc38a51538aa
child 987 ae7b616e7d0e
Fixed some Sun Studio warnings about unreachable code.
src/archiver_zip.c
src/physfs.c
src/physfs_unicode.c
--- a/src/archiver_zip.c	Mon Apr 13 03:40:02 2009 -0400
+++ b/src/archiver_zip.c	Mon Apr 13 03:40:30 2009 -0400
@@ -157,8 +157,6 @@
         case Z_VERSION_ERROR: return(ERR_VERSION_ERROR);
         default: return(ERR_UNKNOWN_ERROR);
     } /* switch */
-
-    return(NULL);
 } /* zlib_error_string */
 
 
--- a/src/physfs.c	Mon Apr 13 03:40:02 2009 -0400
+++ b/src/physfs.c	Mon Apr 13 03:40:30 2009 -0400
@@ -696,7 +696,6 @@
 
     /* argv0 wasn't helpful. */
     BAIL_MACRO(ERR_INVALID_ARGUMENT, NULL);
-    return(NULL);
 } /* calculateBaseDir */
 
 
--- a/src/physfs_unicode.c	Mon Apr 13 03:40:02 2009 -0400
+++ b/src/physfs_unicode.c	Mon Apr 13 03:40:30 2009 -0400
@@ -392,11 +392,11 @@
     {
         const PHYSFS_uint32 cp1 = utf8codepoint(&str1);
         const PHYSFS_uint32 cp2 = utf8codepoint(&str2);
-        if (!utf8codepointcmp(cp1, cp2)) return 0;
+        if (!utf8codepointcmp(cp1, cp2)) break;
         if (cp1 == 0) return 1;
     } /* while */
 
-    return 0;  /* shouldn't hit this. */
+    return 0;
 } /* __PHYSFS_utf8strcasecmp */
 
 
@@ -428,10 +428,10 @@
         else if (cp1 > cp2)
             return 1;
         else if (cp1 == 0)  /* they're both null chars? */
-            return 0;
+            break;
     } /* while */
 
-    return 0;  /* shouldn't hit this. */
+    return 0;
 } /* __PHYSFS_stricmpASCII */