diff options
author | Anatol Belski <ab@php.net> | 2013-06-04 20:18:28 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2013-06-04 20:18:28 +0200 |
commit | 990fa8e3ee84195c35c3c68d9f8a1435ddf97d59 (patch) | |
tree | a44ddc8085e0016a6af93291fdd337283deee791 | |
parent | ed819fb9268535589c2302277f4d80afa6d38d79 (diff) |
Fix C89 compat needed by MSVC
-rw-r--r-- | json_util.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/json_util.c b/json_util.c index 111fa01..d62d54e 100644 --- a/json_util.c +++ b/json_util.c @@ -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) |