From 07e97a0166c8c247cceff3d7901ed3f8852351bf Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 13 Apr 2009 03:40:30 -0400 Subject: [PATCH] Fixed some Sun Studio warnings about unreachable code. --- src/archiver_zip.c | 2 -- src/physfs.c | 1 - src/physfs_unicode.c | 8 ++++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/archiver_zip.c b/src/archiver_zip.c index 92fe2232..03e3a395 100644 --- a/src/archiver_zip.c +++ b/src/archiver_zip.c @@ -157,8 +157,6 @@ static const char *zlib_error_string(int rc) case Z_VERSION_ERROR: return(ERR_VERSION_ERROR); default: return(ERR_UNKNOWN_ERROR); } /* switch */ - - return(NULL); } /* zlib_error_string */ diff --git a/src/physfs.c b/src/physfs.c index 5d2cdf00..087c2d12 100644 --- a/src/physfs.c +++ b/src/physfs.c @@ -696,7 +696,6 @@ static char *calculateBaseDir(const char *argv0) /* argv0 wasn't helpful. */ BAIL_MACRO(ERR_INVALID_ARGUMENT, NULL); - return(NULL); } /* calculateBaseDir */ diff --git a/src/physfs_unicode.c b/src/physfs_unicode.c index 030bcc86..3de76ffb 100644 --- a/src/physfs_unicode.c +++ b/src/physfs_unicode.c @@ -392,11 +392,11 @@ int __PHYSFS_utf8strcasecmp(const char *str1, const char *str2) { 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 @@ int __PHYSFS_stricmpASCII(const char *str1, const char *str2) 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 */