Skip to content

Commit 0caa5ab

Browse files
committed
CCBC-1596: Fix signatures to match declaration with (void) for arg list
contrib/cJSON/cJSON.c:924:24: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] cJSON *cJSON_CreateNull() ^ contrib/cJSON/cJSON.c:930:24: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] cJSON *cJSON_CreateTrue() ^ contrib/cJSON/cJSON.c:936:25: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] cJSON *cJSON_CreateFalse() ^ contrib/cJSON/cJSON.c:965:25: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] cJSON *cJSON_CreateArray() ^ contrib/cJSON/cJSON.c:971:26: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] cJSON *cJSON_CreateObject() ^ contrib/HdrHistogram_c/src/hdr_thread.c:91:15: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] void hdr_yield() ^ Change-Id: I6edd9079406a6fd3132b9c54710076dfd4855fb9 Reviewed-on: https://review.couchbase.org/c/libcouchbase/+/190105 Reviewed-by: Brett Lawson <brett19@gmail.com> Reviewed-by: Trond Norbye <trond.norbye@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
1 parent d4738c8 commit 0caa5ab

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

contrib/HdrHistogram_c/src/hdr_thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void hdr_mutex_unlock(struct hdr_mutex* mutex)
8888
pthread_mutex_unlock(&mutex->_mutex);
8989
}
9090

91-
void hdr_yield()
91+
void hdr_yield(void)
9292
{
9393
sched_yield();
9494
}

contrib/cJSON/cJSON.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -921,19 +921,19 @@ void cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem
921921
}
922922

923923
/* Create basic types: */
924-
cJSON *cJSON_CreateNull()
924+
cJSON *cJSON_CreateNull(void)
925925
{
926926
cJSON *item = cJSON_New_Item(0);
927927
item->type = cJSON_NULL;
928928
return item;
929929
}
930-
cJSON *cJSON_CreateTrue()
930+
cJSON *cJSON_CreateTrue(void)
931931
{
932932
cJSON *item = cJSON_New_Item(0);
933933
item->type = cJSON_True;
934934
return item;
935935
}
936-
cJSON *cJSON_CreateFalse()
936+
cJSON *cJSON_CreateFalse(void)
937937
{
938938
cJSON *item = cJSON_New_Item(0);
939939
item->type = cJSON_False;
@@ -962,13 +962,13 @@ cJSON *cJSON_CreateString(const char *string)
962962
item->valuestring = cJSON_strdup(string);
963963
return item;
964964
}
965-
cJSON *cJSON_CreateArray()
965+
cJSON *cJSON_CreateArray(void)
966966
{
967967
cJSON *item = cJSON_New_Item(0);
968968
item->type = cJSON_Array;
969969
return item;
970970
}
971-
cJSON *cJSON_CreateObject()
971+
cJSON *cJSON_CreateObject(void)
972972
{
973973
cJSON *item = cJSON_New_Item(0);
974974
item->type = cJSON_Object;

0 commit comments

Comments
 (0)