Skip to content

Commit 92ae871

Browse files
committed
Update samples
1 parent 6b448ef commit 92ae871

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

samples/client/others/c/bearerAuth/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ cmake_policy(SET CMP0063 NEW)
66
set(CMAKE_C_VISIBILITY_PRESET default)
77
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
88
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
9+
set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration")
910

1011
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
1112

@@ -14,7 +15,7 @@ find_package(OpenSSL)
1415
if (OPENSSL_FOUND)
1516
message (STATUS "OPENSSL found")
1617

17-
set(CMAKE_C_FLAGS "-DOPENSSL")
18+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL")
1819
if(CMAKE_VERSION VERSION_LESS 3.4)
1920
include_directories(${OPENSSL_INCLUDE_DIR})
2021
include_directories(${OPENSSL_INCLUDE_DIRS})

samples/client/petstore/c-useJsonUnformatted/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ cmake_policy(SET CMP0063 NEW)
66
set(CMAKE_C_VISIBILITY_PRESET default)
77
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
88
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
9+
set(CMAKE_C_FLAGS "-Werror=implicit-function-declaration")
910

1011
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
1112

@@ -14,7 +15,7 @@ find_package(OpenSSL)
1415
if (OPENSSL_FOUND)
1516
message (STATUS "OPENSSL found")
1617

17-
set(CMAKE_C_FLAGS "-DOPENSSL")
18+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL")
1819
if(CMAKE_VERSION VERSION_LESS 3.4)
1920
include_directories(${OPENSSL_INCLUDE_DIR})
2021
include_directories(${OPENSSL_INCLUDE_DIRS})

samples/client/petstore/c-useJsonUnformatted/model/order.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#include "order.h"
55

66

7-
char* order_status_ToString(openapi_petstore_order_STATUS_e status) {
7+
char* statusorder_ToString(openapi_petstore_order_STATUS_e status) {
88
char* statusArray[] = { "NULL", "placed", "approved", "delivered" };
99
return statusArray[status];
1010
}
1111

12-
openapi_petstore_order_STATUS_e order_status_FromString(char* status){
12+
openapi_petstore_order_STATUS_e statusorder_FromString(char* status){
1313
int stringToReturn = 0;
1414
char *statusArray[] = { "NULL", "placed", "approved", "delivered" };
1515
size_t sizeofArray = sizeof(statusArray) / sizeof(statusArray[0]);
@@ -179,7 +179,7 @@ order_t *order_parseFromJSON(cJSON *orderJSON){
179179
{
180180
goto end; //Enum
181181
}
182-
statusVariable = order_status_FromString(status->valuestring);
182+
statusVariable = statusorder_FromString(status->valuestring);
183183
}
184184

185185
// order->complete

samples/client/petstore/c-useJsonUnformatted/model/pet.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#include "pet.h"
55

66

7-
char* pet_status_ToString(openapi_petstore_pet_STATUS_e status) {
7+
char* statuspet_ToString(openapi_petstore_pet_STATUS_e status) {
88
char* statusArray[] = { "NULL", "available", "pending", "sold" };
99
return statusArray[status];
1010
}
1111

12-
openapi_petstore_pet_STATUS_e pet_status_FromString(char* status){
12+
openapi_petstore_pet_STATUS_e statuspet_FromString(char* status){
1313
int stringToReturn = 0;
1414
char *statusArray[] = { "NULL", "available", "pending", "sold" };
1515
size_t sizeofArray = sizeof(statusArray) / sizeof(statusArray[0]);
@@ -271,7 +271,7 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){
271271
{
272272
goto end; //Enum
273273
}
274-
statusVariable = pet_status_FromString(status->valuestring);
274+
statusVariable = statuspet_FromString(status->valuestring);
275275
}
276276

277277

0 commit comments

Comments
 (0)