From 6d5f11268b3d6c53fa05d35f4d0d0481e17361b0 Mon Sep 17 00:00:00 2001 From: NADAL Jean-Baptiste Date: Fri, 26 Feb 2016 22:48:34 +0100 Subject: [PATCH] Fix compilation of libjson 0.12 --- 3P/json/builders/cmake/CMakeLists.txt | 5 ++--- 3P/json/builders/linux-gcc/Makefile | 31 --------------------------- 3P/json/config.h.in | 3 +-- 3P/json/json_tokener.c | 4 ++-- 4 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 3P/json/builders/linux-gcc/Makefile diff --git a/3P/json/builders/cmake/CMakeLists.txt b/3P/json/builders/cmake/CMakeLists.txt index cae1bf93..39370ae9 100644 --- a/3P/json/builders/cmake/CMakeLists.txt +++ b/3P/json/builders/cmake/CMakeLists.txt @@ -16,14 +16,13 @@ file( ../../json_util.c ../../linkhash.c ../../printbuf.c + ../../random_seed.c ) -set(CMAKE_C_FLAGS "-Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT") +set(CMAKE_C_FLAGS "-Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT") add_library( json-c SHARED ${source_files} ) - -target_include_directories (json-c PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/3P/json/builders/linux-gcc/Makefile b/3P/json/builders/linux-gcc/Makefile deleted file mode 100644 index 9281599b..00000000 --- a/3P/json/builders/linux-gcc/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -ifeq (,$(filter _%,$(notdir $(CURDIR)))) -include $(AWOXCVS)/AwoxSoftware/builders/linux-gcc/target.mk -else - - -include $(BUILDERS)/main.mk -include $(AUDIOBUILDERS)/use-libjson-c.mk - -VPATH = ../../.. - -OBJS += arraylist.o -OBJS += debug.o -OBJS += json_c_version.o -OBJS += json_object.o -OBJS += json_object_iterator.o -OBJS += json_tokener.o -OBJS += json_util.o -OBJS += linkhash.o -OBJS += printbuf.o - -AWOX_CFLAGS += -I../../../ - -AWOX_CFLAGS += -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT - -MAKELIB_TARGET=json-c - -LIB_DEPS=$(AWOX_LIB_DEPS) - -include $(BUILDERS)/make-lib.mk - -endif diff --git a/3P/json/config.h.in b/3P/json/config.h.in index 0dcab1a3..933594fe 100644 --- a/3P/json/config.h.in +++ b/3P/json/config.h.in @@ -130,8 +130,7 @@ /* Public define for json_inttypes.h */ #undef JSON_C_HAVE_INTTYPES_H -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ diff --git a/3P/json/json_tokener.c b/3P/json/json_tokener.c index 19de8efc..5af38823 100644 --- a/3P/json/json_tokener.c +++ b/3P/json/json_tokener.c @@ -352,12 +352,12 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, case json_tokener_state_inf: /* aka starts with 'i' */ { - int size; + //int size; int size_inf; int is_negative = 0; printbuf_memappend_fast(tok->pb, &c, 1); - size = json_min(tok->st_pos+1, json_null_str_len); + //size = json_min(tok->st_pos+1, json_null_str_len); size_inf = json_min(tok->st_pos+1, json_inf_str_len); char *infbuf = tok->pb->buf; if (*infbuf == '-')