Suppress unused param warnings.

This commit is contained in:
Dianne Skoll
2020-01-09 18:53:00 -05:00
parent ac3cb19c26
commit de1afce8da

View File

@@ -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)