mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 21:30:10 +00:00
[SBI] fix the compile warning in MacOSX
This commit is contained in:
parent
0b063a57c8
commit
e5a0dfb444
33 changed files with 66 additions and 58 deletions
|
|
@ -146,9 +146,18 @@ static void *internal_realloc(void *pointer, size_t size)
|
|||
#endif
|
||||
#else
|
||||
#include "ogs-core.h"
|
||||
#define internal_malloc ogs_malloc
|
||||
#define internal_free ogs_free
|
||||
#define internal_realloc ogs_realloc
|
||||
static void *internal_malloc(size_t size)
|
||||
{
|
||||
return ogs_malloc(size);
|
||||
}
|
||||
static void internal_free(void *pointer)
|
||||
{
|
||||
ogs_free(pointer);
|
||||
}
|
||||
static void *internal_realloc(void *pointer, size_t size)
|
||||
{
|
||||
return ogs_realloc(pointer, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
static internal_hooks global_hooks = { internal_malloc, internal_free, internal_realloc };
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ cJSON *OpenAPI_{{classname}}_convertToJSON(OpenAPI_{{classname}}_t *{{classname}
|
|||
OpenAPI_lnode_t *{{{name}}}_node;
|
||||
if ({{{classname}}}->{{{name}}}) {
|
||||
OpenAPI_list_for_each({{classname}}->{{{name}}}, {{{name}}}_node) {
|
||||
cJSON *itemLocal = OpenAPI_{{complexType}}_convertToJSON({{#isEnum}}{{#items}}(OpenAPI_{{classVarName}}_{{name}}_e){{/items}}{{/isEnum}}{{{name}}}_node->data);
|
||||
cJSON *itemLocal = OpenAPI_{{complexType}}_convertToJSON({{#isEnum}}{{#items}}(intptr_t){{/items}}{{/isEnum}}{{{name}}}_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
|
||||
goto end;
|
||||
|
|
@ -403,7 +403,7 @@ cJSON *OpenAPI_{{classname}}_convertToJSON(OpenAPI_{{classname}}_t *{{classname}
|
|||
}
|
||||
OpenAPI_lnode_t *{{{name}}}_node;
|
||||
OpenAPI_list_for_each({{classname}}->{{{name}}}, {{{name}}}_node) {
|
||||
if (cJSON_AddStringToObject({{{name}}}, "", OpenAPI_{{{complexType}}}_ToString((OpenAPI_{{{complexType}}}_e){{{name}}}_node->data)) == NULL) {
|
||||
if (cJSON_AddStringToObject({{{name}}}, "", OpenAPI_{{{complexType}}}_ToString((intptr_t){{{name}}}_node->data)) == NULL) {
|
||||
ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
|
||||
goto end;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue