forked from organicmaps/organicmaps
[jansson] Fixed compilation warnings
This commit is contained in:
parent
c73dc3897e
commit
db5ecf1824
5 changed files with 16 additions and 4 deletions
|
@ -16,6 +16,11 @@
|
|||
#include "strbuffer.h"
|
||||
#include "utf.h"
|
||||
|
||||
// Visual Studio fix
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define MAX_INTEGER_STR_LENGTH 100
|
||||
#define MAX_REAL_STR_LENGTH 100
|
||||
|
||||
|
@ -306,7 +311,7 @@ static int do_dump(const json_t *json, unsigned long flags, int depth,
|
|||
|
||||
if(flags & JSON_SORT_KEYS || flags & JSON_PRESERVE_ORDER)
|
||||
{
|
||||
const object_key_t **keys;
|
||||
object_key_t **keys;
|
||||
unsigned int size;
|
||||
unsigned int i;
|
||||
int (*cmp_func)(const void *, const void *);
|
||||
|
|
|
@ -55,6 +55,6 @@ typedef struct {
|
|||
char key[];
|
||||
} object_key_t;
|
||||
|
||||
const object_key_t *jsonp_object_iter_fullkey(void *iter);
|
||||
object_key_t *jsonp_object_iter_fullkey(void *iter);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,6 +20,11 @@
|
|||
#include "strbuffer.h"
|
||||
#include "utf.h"
|
||||
|
||||
// Visual Studio fix
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define TOKEN_INVALID -1
|
||||
#define TOKEN_EOF 0
|
||||
#define TOKEN_STRING 256
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||
#ifndef max
|
||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -232,7 +232,7 @@ void *json_object_iter_next(json_t *json, void *iter)
|
|||
return hashtable_iter_next(&object->hashtable, iter);
|
||||
}
|
||||
|
||||
const object_key_t *jsonp_object_iter_fullkey(void *iter)
|
||||
object_key_t *jsonp_object_iter_fullkey(void *iter)
|
||||
{
|
||||
if(!iter)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue