You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/07/18 12:24:48 UTC
svn commit: r795339 - in /commons/sandbox/runtime/trunk/src/main/native:
configure shared/string.c
Author: mturk
Date: Sat Jul 18 10:24:47 2009
New Revision: 795339
URL: http://svn.apache.org/viewvc?rev=795339&view=rev
Log:
Sun's compiler doesn't like unreachable statements.
Modified:
commons/sandbox/runtime/trunk/src/main/native/configure
commons/sandbox/runtime/trunk/src/main/native/shared/string.c
Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=795339&r1=795338&r2=795339&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Sat Jul 18 10:24:47 2009
@@ -775,7 +775,7 @@
have_zlib=1
else
have_zlib=0
- if [ $has_zlib_set = false ]; then
+ if [ ! $has_zlib_set ]; then
if $is_unix; then
ok=`have_library z zlib`
if [ ".$ok" = ".1" ]; then
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/string.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/string.c?rev=795339&r1=795338&r2=795339&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/string.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/string.c Sat Jul 18 10:24:47 2009
@@ -715,6 +715,7 @@
ACR_DECLARE(char *) ACR_GetJavaStringA(JNIEnv *_E, jstring str, char *b)
{
+ char rv = NULL;
if (!str) {
return NULL;
}
@@ -724,17 +725,16 @@
}
switch (acr_native_codepage) {
case ACR_CP_ISO8859_1:
- return get_string_iso_8859_1(_E, str, b);
+ rv = get_string_iso_8859_1(_E, str, b);
break;
case ACR_CP_UTF_8:
- return get_string_utf_8(_E, str, b);
+ rv = get_string_utf_8(_E, str, b);
break;
default:
- return get_string_default(_E, str, b);
+ rv = get_string_default(_E, str, b);
break;
}
- /* Never reached */
- return NULL;
+ return rv;
}
ACR_DECLARE(jstring) ACR_NewJavaStringW(JNIEnv *_E, const wchar_t *s)
@@ -773,7 +773,7 @@
ACR_DECLARE(jstring) ACR_NewJavaStringA(JNIEnv *_E, const char *str)
{
-
+ char rv = NULL;
if (!str)
return NULL;
if ((*_E)->EnsureLocalCapacity(_E, 2) < 0) {
@@ -782,17 +782,16 @@
}
switch (acr_native_codepage) {
case ACR_CP_ISO8859_1:
- return new_string_iso_8859_1(_E, str);
+ rv = new_string_iso_8859_1(_E, str);
break;
case ACR_CP_UTF_8:
- return new_string_utf_8(_E, str);
+ rv = new_string_utf_8(_E, str);
break;
default:
- return new_string_default(_E, str);
+ rv = new_string_default(_E, str);
break;
}
- /* Never reached */
- return NULL;
+ return rv;
}
/* Match = 0, NoMatch = 1, Abort = -1