Fix a number of GCC warnings

This commit is contained in:
jp9000
2017-12-06 16:42:45 -08:00
parent 4704723759
commit 0497095f97
8 changed files with 25 additions and 28 deletions

View File

@@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <assert.h>
#include "jansson.h"
@@ -187,7 +188,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
int size;
size = snprintf(buffer, MAX_INTEGER_STR_LENGTH,
"%" JSON_INTEGER_FORMAT,
"%" PRId64,
json_integer_value(json));
if(size < 0 || size >= MAX_INTEGER_STR_LENGTH)
return -1;