提交 a8e13686 编写于 作者: S Stephan Gatzka

Make function static when possible.

This is a prerequisite to later enable -Wmissing-prototypes.
上级 bea0be48
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "cJSON.h" #include "cJSON.h"
/* Parse text to JSON, then render back to text, and print! */ /* Parse text to JSON, then render back to text, and print! */
void doit(char *text) static void doit(char *text)
{ {
char *out = NULL; char *out = NULL;
cJSON *json = NULL; cJSON *json = NULL;
...@@ -44,8 +44,9 @@ void doit(char *text) ...@@ -44,8 +44,9 @@ void doit(char *text)
} }
} }
#if 0
/* Read a file, parse, render back, etc. */ /* Read a file, parse, render back, etc. */
void dofile(char *filename) static void dofile(char *filename)
{ {
FILE *f = NULL; FILE *f = NULL;
long len = 0; long len = 0;
...@@ -67,6 +68,7 @@ void dofile(char *filename) ...@@ -67,6 +68,7 @@ void dofile(char *filename)
doit(data); doit(data);
free(data); free(data);
} }
#endif
/* Used by some code below as an example datatype. */ /* Used by some code below as an example datatype. */
struct record struct record
...@@ -82,7 +84,7 @@ struct record ...@@ -82,7 +84,7 @@ struct record
}; };
/* Create a bunch of objects as demonstration. */ /* Create a bunch of objects as demonstration. */
void create_objects(void) static void create_objects(void)
{ {
/* declare a few. */ /* declare a few. */
cJSON *root = NULL; cJSON *root = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册