Browse Source

Merge pull request #579 from besser82/topic/besser82/strict-prototypes

Enforce strict prototypes.
tags/json-c-0.14-20200419
Eric Haszlakiewicz GitHub 5 years ago
parent
commit
511edb51a4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions
  1. +1
    -0
      CMakeLists.txt
  2. +1
    -1
      json_object.c
  3. +1
    -1
      json_object.h

+ 1
- 0
CMakeLists.txt View File

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


+ 1
- 1
json_object.c View File

@@ -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;
}


+ 1
- 1
json_object.h View File

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


Loading…
Cancel
Save