summaryrefslogtreecommitdiff
path: root/json_util.c
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2013-02-09 16:35:24 -0600
committerEric Haszlakiewicz <erh+git@nimenees.com>2013-02-09 16:35:24 -0600
commitca8b27d1836ff97935d2eb212f762f63b9258cbd (patch)
tree43a44a037bfa29c45738c8310640b6053f225e22 /json_util.c
parent92d289f5d366058284b69180c3c32ea10ef51610 (diff)
Enable -Werror and fix a number of minor warnings that existed.
Diffstat (limited to 'json_util.c')
-rw-r--r--json_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/json_util.c b/json_util.c
index 4030cbe..4e4e00c 100644
--- a/json_util.c
+++ b/json_util.c
@@ -194,7 +194,7 @@ int json_parse_int64(const char *buf, int64_t *retval)
*/
if (orig_has_neg != recheck_has_neg ||
strncmp(buf_skip_space, buf_cmp_start, strlen(buf_cmp_start)) != 0 ||
- (strlen(buf_skip_space) != buf_cmp_len &&
+ ((int)strlen(buf_skip_space) != buf_cmp_len &&
isdigit((int)buf_skip_space[buf_cmp_len])
)
)
@@ -238,7 +238,8 @@ static const char* json_type_name[] = {
const char *json_type_to_name(enum json_type o_type)
{
- if (o_type < 0 || o_type >= NELEM(json_type_name))
+ int o_type_int = (int)o_type;
+ if (o_type_int < 0 || o_type_int >= (int)NELEM(json_type_name))
{
MC_ERROR("json_type_to_name: type %d is out of range [0,%d]\n", o_type, NELEM(json_type_name));
return NULL;