Skip to content

Commit

Permalink
Enforce strict prototypes.
Browse files Browse the repository at this point in the history
  • Loading branch information
besser82 committed Apr 13, 2020
1 parent 4742a2a commit d0dc348
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wwrite-strings")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-prototypes")

add_definitions(-D_GNU_SOURCE)
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
Expand Down
2 changes: 1 addition & 1 deletion json_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ static int json_array_equal(struct json_object *jso1, struct json_object *jso2)
return 1;
}

struct json_object *json_object_new_null()
struct json_object *json_object_new_null(void)
{
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion json_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ JSON_EXPORT int json_object_set_string_len(json_object *obj, const char *new_val
* along the lines of the other json_object_new_* functions.
* It always returns NULL, and it is entirely acceptable to simply use NULL directly.
*/
JSON_EXPORT struct json_object *json_object_new_null();
JSON_EXPORT struct json_object *json_object_new_null(void);

/** Check if two json_object's are equal
*
Expand Down

0 comments on commit d0dc348

Please sign in to comment.