diff --git a/samples/client/others/c/bearerAuth/CMakeLists.txt b/samples/client/others/c/bearerAuth/CMakeLists.txt index 2bfcf58899c0..f7eddc4c612f 100644 --- a/samples/client/others/c/bearerAuth/CMakeLists.txt +++ b/samples/client/others/c/bearerAuth/CMakeLists.txt @@ -6,6 +6,7 @@ cmake_policy(SET CMP0063 NEW) set(CMAKE_C_VISIBILITY_PRESET default) set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration") option(BUILD_SHARED_LIBS "Build using shared libraries" ON) @@ -14,7 +15,7 @@ find_package(OpenSSL) if (OPENSSL_FOUND) message (STATUS "OPENSSL found") - set(CMAKE_C_FLAGS "-DOPENSSL") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL") if(CMAKE_VERSION VERSION_LESS 3.4) include_directories(${OPENSSL_INCLUDE_DIR}) include_directories(${OPENSSL_INCLUDE_DIRS}) diff --git a/samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt b/samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt index c97fd637cdb9..68895c666576 100644 --- a/samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt +++ b/samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt @@ -6,6 +6,7 @@ cmake_policy(SET CMP0063 NEW) set(CMAKE_C_VISIBILITY_PRESET default) set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration") option(BUILD_SHARED_LIBS "Build using shared libraries" ON) @@ -14,7 +15,7 @@ find_package(OpenSSL) if (OPENSSL_FOUND) message (STATUS "OPENSSL found") - set(CMAKE_C_FLAGS "-DOPENSSL") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL") if(CMAKE_VERSION VERSION_LESS 3.4) include_directories(${OPENSSL_INCLUDE_DIR}) include_directories(${OPENSSL_INCLUDE_DIRS}) diff --git a/samples/client/petstore/c-useJsonUnformatted/model/order.c b/samples/client/petstore/c-useJsonUnformatted/model/order.c index bbbc50e1a316..055dd08a3896 100644 --- a/samples/client/petstore/c-useJsonUnformatted/model/order.c +++ b/samples/client/petstore/c-useJsonUnformatted/model/order.c @@ -94,7 +94,7 @@ cJSON *order_convertToJSON(order_t *order) { // order->status if(order->status != openapi_petstore_order_STATUS_NULL) { - if(cJSON_AddStringToObject(item, "status", statusorder_ToString(order->status)) == NULL) + if(cJSON_AddStringToObject(item, "status", order_status_ToString(order->status)) == NULL) { goto fail; //Enum } diff --git a/samples/client/petstore/c-useJsonUnformatted/model/pet.c b/samples/client/petstore/c-useJsonUnformatted/model/pet.c index d95d672eda00..2472e769095d 100644 --- a/samples/client/petstore/c-useJsonUnformatted/model/pet.c +++ b/samples/client/petstore/c-useJsonUnformatted/model/pet.c @@ -148,7 +148,7 @@ cJSON *pet_convertToJSON(pet_t *pet) { // pet->status if(pet->status != openapi_petstore_pet_STATUS_NULL) { - if(cJSON_AddStringToObject(item, "status", statuspet_ToString(pet->status)) == NULL) + if(cJSON_AddStringToObject(item, "status", pet_status_ToString(pet->status)) == NULL) { goto fail; //Enum } diff --git a/samples/client/petstore/c/model/order.c b/samples/client/petstore/c/model/order.c index bbbc50e1a316..055dd08a3896 100644 --- a/samples/client/petstore/c/model/order.c +++ b/samples/client/petstore/c/model/order.c @@ -94,7 +94,7 @@ cJSON *order_convertToJSON(order_t *order) { // order->status if(order->status != openapi_petstore_order_STATUS_NULL) { - if(cJSON_AddStringToObject(item, "status", statusorder_ToString(order->status)) == NULL) + if(cJSON_AddStringToObject(item, "status", order_status_ToString(order->status)) == NULL) { goto fail; //Enum } diff --git a/samples/client/petstore/c/model/pet.c b/samples/client/petstore/c/model/pet.c index d95d672eda00..2472e769095d 100644 --- a/samples/client/petstore/c/model/pet.c +++ b/samples/client/petstore/c/model/pet.c @@ -148,7 +148,7 @@ cJSON *pet_convertToJSON(pet_t *pet) { // pet->status if(pet->status != openapi_petstore_pet_STATUS_NULL) { - if(cJSON_AddStringToObject(item, "status", statuspet_ToString(pet->status)) == NULL) + if(cJSON_AddStringToObject(item, "status", pet_status_ToString(pet->status)) == NULL) { goto fail; //Enum }