summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLloyd Hilaiel <lloyd@hilaiel.com>2009-02-16 11:22:35 -0700
committerLloyd Hilaiel <lloyd@hilaiel.com>2009-02-16 11:22:35 -0700
commit0382651d75952a45208bcedf3ae39e9b2a8f6cf2 (patch)
treeac0c9cb9b7d71baf7160ddc4f83105b25798919f /test
parent2d0df50e483f7767a6434bd60ecb880a5951e1a0 (diff)
downloadyajl-0382651d75952a45208bcedf3ae39e9b2a8f6cf2.tar.gz
build with gcc flags suggested by Mark de Does, clean up resultant compiler warnings
Diffstat (limited to 'test')
-rw-r--r--test/yajl_test.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/yajl_test.c b/test/yajl_test.c
index 667f822..35bcc9d 100644
--- a/test/yajl_test.c
+++ b/test/yajl_test.c
@@ -39,32 +39,32 @@
#define BUF_SIZE 2048
-int test_yajl_null(void *ctx)
+static int test_yajl_null(void *ctx)
{
printf("null\n");
return 1;
}
-int test_yajl_boolean(void * ctx, int boolVal)
+static int test_yajl_boolean(void * ctx, int boolVal)
{
printf("bool: %s\n", boolVal ? "true" : "false");
return 1;
}
-int test_yajl_integer(void *ctx, long integerVal)
+static int test_yajl_integer(void *ctx, long integerVal)
{
printf("integer: %ld\n", integerVal);
return 1;
}
-int test_yajl_double(void *ctx, double doubleVal)
+static int test_yajl_double(void *ctx, double doubleVal)
{
- printf("double: %lf\n", doubleVal);
+ printf("double: %g\n", doubleVal);
return 1;
}
-int test_yajl_string(void *ctx, const unsigned char * stringVal,
- unsigned int stringLen)
+static int test_yajl_string(void *ctx, const unsigned char * stringVal,
+ unsigned int stringLen)
{
printf("string: '");
fwrite(stringVal, 1, stringLen, stdout);
@@ -72,8 +72,8 @@ int test_yajl_string(void *ctx, const unsigned char * stringVal,
return 1;
}
-int test_yajl_map_key(void *ctx, const unsigned char * stringVal,
- unsigned int stringLen)
+static int test_yajl_map_key(void *ctx, const unsigned char * stringVal,
+ unsigned int stringLen)
{
char * str = (char *) malloc(stringLen + 1);
str[stringLen] = 0;
@@ -83,26 +83,26 @@ int test_yajl_map_key(void *ctx, const unsigned char * stringVal,
return 1;
}
-int test_yajl_start_map(void *ctx)
+static int test_yajl_start_map(void *ctx)
{
printf("map open '{'\n");
return 1;
}
-int test_yajl_end_map(void *ctx)
+static int test_yajl_end_map(void *ctx)
{
printf("map close '}'\n");
return 1;
}
-int test_yajl_start_array(void *ctx)
+static int test_yajl_start_array(void *ctx)
{
printf("array open '['\n");
return 1;
}
-int test_yajl_end_array(void *ctx)
+static int test_yajl_end_array(void *ctx)
{
printf("array close ']'\n");
return 1;