]> granicus.if.org Git - json-c/commitdiff
* Fixed warning reported by adding -Wstrict-prototypes
authorMichael Clark <michael@metaparadigm.com>
Wed, 25 Feb 2009 01:45:00 +0000 (01:45 +0000)
committerMichael Clark <michael@metaparadigm.com>
Wed, 25 Feb 2009 01:45:00 +0000 (01:45 +0000)
    -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

ChangeLog
debug.c
json_object.c
json_tokener.c
printbuf.c

index c91e2c7c993b23d1643daf1ff64b0116d757b47f..e8f0d35229ab3a7eac593546aaacb1e6e7f74721 100644 (file)
--- 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 f6999765de12c8114126ad9ea1187e6e0d961d6d..e0294caa6ef1b68d74e6eb08b7aa7d15a1828f82 100644 (file)
--- 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)
 {
index 3ff4d64fff8ec517379c9dcda4c91fa426b22031..a7468590b1f349161ec90b3da9007b5fff6dfe3c 100644 (file)
@@ -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;
index c904f48f31f336ade324df7e424251971b640a1d..3f196db37b08aa5a07c292e2098de033cc941f90 100644 (file)
@@ -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();
index 6522a690e750a2a30bb932f94e64e62e6ff4be58..bbb865728cd2b8e29eb0ebd99ceaddaa549d94ff 100644 (file)
@@ -25,7 +25,7 @@
 #include "debug.h"
 #include "printbuf.h"
 
-struct printbuf* printbuf_new()
+struct printbuf* printbuf_new(void)
 {
   struct printbuf *p;