]> granicus.if.org Git - json-c/commitdiff
Fix C89 compat needed by MSVC
authorAnatol Belski <ab@php.net>
Tue, 4 Jun 2013 18:18:28 +0000 (20:18 +0200)
committerAnatol Belski <ab@php.net>
Tue, 4 Jun 2013 18:18:28 +0000 (20:18 +0200)
json_util.c

index 111fa01a2b8e68f37d98775b89d4d15e8a9773f4..d62d54e4cc13dd3f6031c9635904201ecd89f5c6 100644 (file)
@@ -159,14 +159,15 @@ int json_parse_double(const char *buf, double *retval)
 static void sscanf_is_broken_test()
 {
        int64_t num64;
+       int ret_errno, is_int64_min, ret_errno2, is_int64_max;
 
        (void)sscanf(" -01234567890123456789012345", "%" SCNd64, &num64);
-       int ret_errno = errno;
-       int is_int64_min = (num64 == INT64_MIN);
+       ret_errno = errno;
+       is_int64_min = (num64 == INT64_MIN);
 
        (void)sscanf(" 01234567890123456789012345", "%" SCNd64, &num64);
-       int ret_errno2 = errno;
-       int is_int64_max = (num64 == INT64_MAX);
+       ret_errno2 = errno;
+       is_int64_max = (num64 == INT64_MAX);
 
        if (ret_errno != ERANGE || !is_int64_min ||
            ret_errno2 != ERANGE || !is_int64_max)