]> granicus.if.org Git - file/commitdiff
make this compile again.
authorChristos Zoulas <christos@zoulas.com>
Wed, 26 Jun 2013 14:46:54 +0000 (14:46 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 26 Jun 2013 14:46:54 +0000 (14:46 +0000)
src/file.c

index ed9ee7460fc2e61d996534cddaa813c63e21b3f9..325210e2c2b0b9e0eb2c369ce45e5a0a3723c878 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: file.c,v 1.150 2013/06/04 21:51:00 ian Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.151 2013/06/09 00:13:36 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -446,7 +446,7 @@ protected size_t
 file_mbswidth(const char *s)
 {
 #if defined(HAVE_WCHAR_H) && defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH)
-       size_t bytesconsumed, old_n, n, w = 0;
+       size_t bytesconsumed, old_n, n, width = 0;
        mbstate_t state;
        wchar_t nextchar;
        (void)memset(&state, 0, sizeof(mbstate_t));
@@ -466,7 +466,7 @@ file_mbswidth(const char *s)
                         */
                        width++;
                } else {
-                       w = wcwidth(nextchar);
+                       int w = wcwidth(nextchar);
                        if (w > 0)
                                width += w;
                }