mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Add warning -Wunused-macro
This commit is contained in:
@ -42,6 +42,7 @@ if (ENABLE_CUSTOM_COMPILER_FLAGS)
|
|||||||
-Wdouble-promotion
|
-Wdouble-promotion
|
||||||
-Wparentheses
|
-Wparentheses
|
||||||
-Wformat-overflow
|
-Wformat-overflow
|
||||||
|
-Wunused-macros
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
1
cJSON.c
1
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) */
|
/* 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 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) */
|
/* 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 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))
|
#define cannot_access_at_index(buffer, index) (!can_access_at_index(buffer, index))
|
||||||
|
Reference in New Issue
Block a user