Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions json.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ typedef struct

static void * default_alloc (size_t size, int zero, void * user_data)
{
(void)user_data; /* ignore unused-parameter warn */
(void)user_data; /* silence unused parameter warning */
return zero ? calloc (1, size) : malloc (size);
}

static void default_free (void * ptr, void * user_data)
{
(void)user_data; /* ignore unused-parameter warn */
(void)user_data; /* silence unused parameter warning */
free (ptr);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static enum json_test_result json_test(const char * filename_buffer, json_settin
static void * noisy_alloc(size_t count, int zero, void * user_data)
{
void * ret;
(void)user_data; /* silence unused param warning */
(void)user_data; /* silence unused parameter warning */
if(zero)
{
fprintf(stderr, "calloc %lu bytes: ", (unsigned long)count);
Expand All @@ -112,7 +112,7 @@ static void * noisy_alloc(size_t count, int zero, void * user_data)
}
static void noisy_free(void * ptr, void * user_data)
{
(void)user_data; /* silence unused param warning */
(void)user_data; /* silence unused parameter warning */
fprintf(stderr, "free %p\n", ptr);
free(ptr);
}
Expand Down