r20133: get rid of defined but not used warning - static function only used
authorHerb Lewis <herb@samba.org>
Tue, 12 Dec 2006 20:30:31 +0000 (20:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:16:27 +0000 (12:16 -0500)
inside the #ifdef HAVE_NATIVE_ICONV
(This used to be commit 43ab1d2ba5eb24fc22f8d53c650bf39e95fb133b)

source3/lib/iconv.c

index c96243633fbaf6b2049747f27743d1389a63c4fd..6e040b77f17ea0e0f4080ef6f4b80d1c6a85409c 100644 (file)
@@ -128,6 +128,7 @@ static void lazy_initialize_iconv(void)
        }
 }
 
+#ifdef HAVE_NATIVE_ICONV
 /* if there was an error then reset the internal state,
    this ensures that we don't have a shift state remaining for
    character sets like SJIS */
@@ -135,7 +136,6 @@ static size_t sys_iconv(void *cd,
                        const char **inbuf, size_t *inbytesleft,
                        char **outbuf, size_t *outbytesleft)
 {
-#ifdef HAVE_NATIVE_ICONV
        size_t ret = iconv((iconv_t)cd, 
                           (char **)inbuf, inbytesleft, 
                           outbuf, outbytesleft);
@@ -145,11 +145,8 @@ static size_t sys_iconv(void *cd,
                errno = saved_errno;
        }
        return ret;
-#else
-       errno = EINVAL;
-       return -1;
-#endif
 }
+#endif
 
 /**
  * This is a simple portable iconv() implementaion.