From 85aa59be38f641d9f59ef150814b2ae99e7ef20e Mon Sep 17 00:00:00 2001 From: Ian Mobley Date: Thu, 6 Oct 2016 13:05:37 -0700 Subject: [PATCH 1/2] Use $(AR) environment variable with libcjson.a Allow for alternative archive tool when using make. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e107202..54f0d19 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ $(DYLIBNAME): $(OBJ) $(DYLIBCMD) $< $(LDFLAGS) $(STLIBNAME): $(OBJ) - ar rcs $@ $< + $(AR) rcs $@ $< $(OBJ): cJSON.c cJSON.h From d4836effc97ce2bdf132c9eca266506ecf467699 Mon Sep 17 00:00:00 2001 From: Ian Mobley Date: Mon, 17 Oct 2016 17:20:57 -0700 Subject: [PATCH 2/2] Fix compiler warning "array subscript has type char" when using arm-none-eabi-gcc --- cJSON.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cJSON.c b/cJSON.c index 36d9233..512f100 100644 --- a/cJSON.c +++ b/cJSON.c @@ -50,7 +50,7 @@ static int cJSON_strcasecmp(const char *s1, const char *s2) { return 1; } - for(; tolower(*s1) == tolower(*s2); ++s1, ++s2) + for(; tolower(*(const unsigned char *)s1) == tolower(*(const unsigned char *)s2); ++s1, ++s2) { if (*s1 == 0) {