Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Consistency in code comments #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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