diff --git a/src/json.c b/src/json.c index c269f4f0..10e890a1 100644 --- a/src/json.c +++ b/src/json.c @@ -29,6 +29,8 @@ #include "json.h" +#define UNUSED(x) ( (void) x ) + #ifdef _MSC_VER #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS @@ -92,12 +94,14 @@ typedef struct static void * default_alloc (size_t size, int zero, void * user_data) { - return zero ? calloc (1, size) : malloc (size); + UNUSED(user_data); + return zero ? calloc (1, size) : malloc (size); } static void default_free (void * ptr, void * user_data) { - free (ptr); + UNUSED(user_data); + free (ptr); } static void * json_alloc (json_state * state, unsigned long size, int zero)