]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix var decl after statement in archive_string.c
authorBrad King <brad.king@kitware.com>
Wed, 11 Jan 2012 13:15:31 +0000 (08:15 -0500)
committerBrad King <brad.king@kitware.com>
Wed, 11 Jan 2012 13:15:31 +0000 (08:15 -0500)
When HAVE_MBRTOWC is true we declare an extra local variable.  Move the
unused argument cast to the end of the invalid_mbs function.

SVN-Revision: 4130

libarchive/archive_string.c

index 550d7e7e6b6243721e42c79b58a2534bbc892d8c..906f12cdc6bb7a48c627c736003a48f533a4236c 100644 (file)
@@ -2291,7 +2291,6 @@ invalid_mbs(const void *_p, size_t n, struct archive_string_conv *sc)
        const char *p = (const char *)_p;
        size_t r;
 
-       (void)sc; /* UNUSED */
 #if HAVE_MBRTOWC
        mbstate_t shift_state;
 
@@ -2315,6 +2314,7 @@ invalid_mbs(const void *_p, size_t n, struct archive_string_conv *sc)
                p += r;
                n -= r;
        }
+       (void)sc; /* UNUSED */
        return (0); /* All Okey. */
 }