From 768a06613e38194e58d37ab3b1c5bb4a326f0e2b Mon Sep 17 00:00:00 2001 From: ultramn Date: Thu, 16 Mar 2017 17:17:07 -0700 Subject: Almost compiles on Apple (not quite there) --- redist/json_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'redist/json_helpers.c') diff --git a/redist/json_helpers.c b/redist/json_helpers.c index 7690318..e0b86f4 100644 --- a/redist/json_helpers.c +++ b/redist/json_helpers.c @@ -7,7 +7,7 @@ #include #include "json_helpers.h" #include -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__APPLE__) #include #endif -- cgit v1.2.3 From 8ea24c306fdf2a141433e396307e92a227416ba5 Mon Sep 17 00:00:00 2001 From: CNLohr Date: Fri, 17 Mar 2017 01:08:06 -0400 Subject: Fix Warnings --- redist/json_helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'redist/json_helpers.c') diff --git a/redist/json_helpers.c b/redist/json_helpers.c index e0b86f4..1e2f43e 100644 --- a/redist/json_helpers.c +++ b/redist/json_helpers.c @@ -107,7 +107,7 @@ void json_write_str(FILE* f, const char* tag, const char* v) { void (*json_begin_object)(char* tag) = NULL; void (*json_end_object)() = NULL; -void (*json_tag_value)(char* tag, char** values, uint16_t count) = NULL; +void (*json_tag_value)(char* tag, char** values, uint8_t count) = NULL; uint32_t JSON_STRING_LEN; @@ -146,7 +146,7 @@ static uint16_t json_load_array(const char* JSON_STRING, jsmntok_t* tokens, uint values[i] = substr(JSON_STRING, t->start, t->end, JSON_STRING_LEN); } - if (json_tag_value != NULL) json_tag_value(tag, values, i); + if (json_tag_value != NULL) json_tag_value(tag, values, (uint8_t)i); for (i=0;i Date: Fri, 17 Mar 2017 01:18:05 -0400 Subject: Fix TCC compile. --- redist/json_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'redist/json_helpers.c') diff --git a/redist/json_helpers.c b/redist/json_helpers.c index 1e2f43e..115076e 100644 --- a/redist/json_helpers.c +++ b/redist/json_helpers.c @@ -11,7 +11,7 @@ #include #endif -#ifdef _WIN32 +#ifdef _MSC_VER #include // Windows doesn't provide asprintf, so we need to make it. -- cgit v1.2.3 From d84be3e09ce89a291f5b9eb04e6cc1fd34a00541 Mon Sep 17 00:00:00 2001 From: CNLohr Date: Fri, 17 Mar 2017 01:33:26 -0400 Subject: Remove winbuild folder. --- redist/json_helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'redist/json_helpers.c') diff --git a/redist/json_helpers.c b/redist/json_helpers.c index 115076e..eb3600b 100644 --- a/redist/json_helpers.c +++ b/redist/json_helpers.c @@ -164,7 +164,8 @@ void json_load_file(const char* path) { jsmn_parser parser; jsmn_init(&parser); - uint32_t items = jsmn_parse(&parser, JSON_STRING, JSON_STRING_LEN, NULL, 0); + int32_t items = jsmn_parse(&parser, JSON_STRING, JSON_STRING_LEN, NULL, 0); + if (items < 0) return; jsmntok_t* tokens = malloc(items * sizeof(jsmntok_t)); jsmn_init(&parser); -- cgit v1.2.3 From 964e147104c902bd2feda4717dd6c852d7514231 Mon Sep 17 00:00:00 2001 From: CNLohr Date: Fri, 17 Mar 2017 02:02:30 -0400 Subject: Move the HID file over to the right place. --- redist/json_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'redist/json_helpers.c') diff --git a/redist/json_helpers.c b/redist/json_helpers.c index eb3600b..0267932 100644 --- a/redist/json_helpers.c +++ b/redist/json_helpers.c @@ -173,7 +173,7 @@ void json_load_file(const char* path) { int16_t children = -1; - for (i=0; i