From f856087aa96adce186427a7ef6bd6bb525215786 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 6 Oct 2020 21:45:32 +0200 Subject: [PATCH] move jansson files from client --- client/CMakeLists.txt | 1 - client/Makefile | 2 +- client/deps/jansson/Makefile | 3 ++- client/{src => deps/jansson}/jansson_path.c | 4 +--- client/{src => deps/jansson}/jansson_path.h | 0 5 files changed, 4 insertions(+), 6 deletions(-) rename client/{src => deps/jansson}/jansson_path.c (99%) rename client/{src => deps/jansson}/jansson_path.h (100%) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index dd4811435..a71e5715d 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -283,7 +283,6 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/fileutils.c ${PM3_ROOT}/client/src/flash.c ${PM3_ROOT}/client/src/graph.c - ${PM3_ROOT}/client/src/jansson_path.c ${PM3_ROOT}/client/src/preferences.c ${PM3_ROOT}/client/src/pm3_binlib.c ${PM3_ROOT}/client/src/pm3_bitlib.c diff --git a/client/Makefile b/client/Makefile index ac51cb1bd..3477c560a 100644 --- a/client/Makefile +++ b/client/Makefile @@ -272,6 +272,7 @@ PM3CFLAGS = $(CFLAGS) PM3CFLAGS += -I./src -I../include -I../common -I../common_fpga $(INCLUDES) # WIP Testing #PM3CFLAGS += -std=c11 -pedantic +PM3CFLAGS += -g PREFIX ?= /usr/local ifneq (,$(findstring MINGW,$(platform))) @@ -505,7 +506,6 @@ SRCS = aidsearch.c \ flash.c \ generator.c \ graph.c \ - jansson_path.c \ loclass/cipher.c \ loclass/cipherutils.c \ loclass/elite_crack.c \ diff --git a/client/deps/jansson/Makefile b/client/deps/jansson/Makefile index b51c4a77c..91f4eec7c 100644 --- a/client/deps/jansson/Makefile +++ b/client/deps/jansson/Makefile @@ -13,7 +13,8 @@ MYSRCS = \ strbuffer.c \ strconv.c \ utf.c \ - value.c + value.c \ + jansson_path.c LIB_A = libjansson.a diff --git a/client/src/jansson_path.c b/client/deps/jansson/jansson_path.c similarity index 99% rename from client/src/jansson_path.c rename to client/deps/jansson/jansson_path.c index b0db54675..8bc224fcd 100644 --- a/client/src/jansson_path.c +++ b/client/deps/jansson/jansson_path.c @@ -38,9 +38,7 @@ static void jsonp_free(void *ptr) { } static char *jsonp_strndup(const char *str, size_t len) { - char *new_str; - - new_str = jsonp_malloc(len + 1); + char *new_str = jsonp_malloc(len + 1); if (!new_str) return NULL; diff --git a/client/src/jansson_path.h b/client/deps/jansson/jansson_path.h similarity index 100% rename from client/src/jansson_path.h rename to client/deps/jansson/jansson_path.h