From 38b2f40a9abc6e73d33b9cb0440900b8c3e46d6f Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Wed, 10 May 2017 01:17:36 +0200 Subject: [PATCH] Add warning -Wunused-macro --- CMakeLists.txt | 1 + cJSON.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3f6f6b..8944894 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,7 @@ if (ENABLE_CUSTOM_COMPILER_FLAGS) -Wdouble-promotion -Wparentheses -Wformat-overflow + -Wunused-macros ) endif() diff --git a/cJSON.c b/cJSON.c index 314560b..6e8255a 100644 --- a/cJSON.c +++ b/cJSON.c @@ -208,7 +208,6 @@ typedef struct /* check if the given size is left to read in a given parse buffer (starting with 1) */ #define can_read(buffer, size) ((buffer != NULL) && (((buffer)->offset + size) <= (buffer)->length)) -#define cannot_read(buffer, size) (!can_read(buffer, size)) /* check if the buffer can be accessed at the given index (starting with 0) */ #define can_access_at_index(buffer, index) ((buffer != NULL) && (((buffer)->offset + index) < (buffer)->length)) #define cannot_access_at_index(buffer, index) (!can_access_at_index(buffer, index))