From: Michael Clark Date: Wed, 25 Feb 2009 01:45:00 +0000 (+0000) Subject: * Fixed warning reported by adding -Wstrict-prototypes X-Git-Tag: json-c-0.10-20120530~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8de07880652465a3894124258796846832f0fff;p=json-c * Fixed warning reported by adding -Wstrict-prototypes -Wold-style-definition to the compilatin flags. Dotan Barak, dotanba at gmail dot com git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@30 327403b1-1117-474d-bef2-5cb71233fd97 --- diff --git a/ChangeLog b/ChangeLog index c91e2c7..e8f0d35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ 0.9 + * Fixed warning reported by adding -Wstrict-prototypes + -Wold-style-definition to the compilatin flags. + Dotan Barak, dotanba at gmail dot com * Add const correctness to public interfaces Gerard Krol, g dot c dot krol at student dot tudelft dot nl diff --git a/debug.c b/debug.c index f699976..e0294ca 100644 --- a/debug.c +++ b/debug.c @@ -34,7 +34,7 @@ static int _syslog = 0; static int _debug = 0; void mc_set_debug(int debug) { _debug = debug; } -int mc_get_debug() { return _debug; } +int mc_get_debug(void) { return _debug; } extern void mc_set_syslog(int syslog) { diff --git a/json_object.c b/json_object.c index 3ff4d64..a746859 100644 --- a/json_object.c +++ b/json_object.c @@ -237,7 +237,7 @@ static void json_object_object_delete(struct json_object* this) json_object_generic_delete(this); } -struct json_object* json_object_new_object() +struct json_object* json_object_new_object(void) { struct json_object *this = json_object_new(json_type_object); if(!this) return NULL; @@ -466,7 +466,7 @@ static void json_object_array_delete(struct json_object* this) json_object_generic_delete(this); } -struct json_object* json_object_new_array() +struct json_object* json_object_new_array(void) { struct json_object *this = json_object_new(json_type_array); if(!this) return NULL; diff --git a/json_tokener.c b/json_tokener.c index c904f48..3f196db 100644 --- a/json_tokener.c +++ b/json_tokener.c @@ -55,7 +55,7 @@ const char* json_tokener_errors[] = { }; -struct json_tokener* json_tokener_new() +struct json_tokener* json_tokener_new(void) { struct json_tokener *tok = calloc(1, sizeof(struct json_tokener)); tok->pb = printbuf_new(); diff --git a/printbuf.c b/printbuf.c index 6522a69..bbb8657 100644 --- a/printbuf.c +++ b/printbuf.c @@ -25,7 +25,7 @@ #include "debug.h" #include "printbuf.h" -struct printbuf* printbuf_new() +struct printbuf* printbuf_new(void) { struct printbuf *p;