diff --git a/Makefile.analyzers b/Makefile.analyzers index f9a7c7d..0faa2db 100644 --- a/Makefile.analyzers +++ b/Makefile.analyzers @@ -688,12 +688,12 @@ endif $(BUILD_TOP)/tests/lwip/%.o: $(LWIP_TOP)/%.c @[ -d $(dir $@) ] || mkdir -p $(dir $@) ifeq "$(V)" "1" - $(CC) $(CFLAGS) -Wno-conversion -c $< -o $@ + $(CC) $(CFLAGS) -Wno-conversion -Wno-format -c $< -o $@ else ifndef VERY_QUIET @echo "$(CC) ... -o $@" endif - @$(CC) $(CFLAGS) -Wno-conversion -c $< -o $@ + @$(CC) $(CFLAGS) -Wno-conversion -Wno-format -c $< -o $@ endif $(BUILD_TOP)/tests/freertos/%.o: $(FREERTOS_TOP)/%.c diff --git a/tests/unittests.c b/tests/unittests.c index da1b722..d9536ed 100644 --- a/tests/unittests.c +++ b/tests/unittests.c @@ -4494,7 +4494,7 @@ static int test_json(const char *fname, const char *extra_fname) { if ((ret = json_dom_parse(WOLFSENTRY_CONTEXT_ARGS_OUT_EX(wolfsentry_get_allocator(wolfsentry)), test_json_document, (size_t)st.st_size, ¢ijson_config, 0 /* dom_flags */, &p_root, &json_pos)) < 0) { - void *p = memchr((const char *)(test_json_document + json_pos.offset), '\n', (size_t)st.st_size - json_pos.offset); + const void *p = memchr((const char *)(test_json_document + json_pos.offset), '\n', (size_t)st.st_size - json_pos.offset); int linelen = p ? ((int)((unsigned char *)p - (test_json_document + json_pos.offset)) + (int)json_pos.column_number - 1) : (((int)st.st_size - (int)json_pos.offset) + (int)json_pos.column_number - 1); if (WOLFSENTRY_ERROR_DECODE_SOURCE_ID(ret) == WOLFSENTRY_SOURCE_ID_UNSET) @@ -5076,7 +5076,7 @@ static int test_json_corpus(void) { if ((ret = json_dom_parse(WOLFSENTRY_CONTEXT_ARGS_OUT_EX(wolfsentry_get_allocator(wolfsentry)), scenario, (size_t)st.st_size, ¢ijson_config, dom_flags, &p_root, &json_pos)) < 0) { - void *p = memchr((const char *)(scenario + json_pos.offset), '\n', (size_t)st.st_size - json_pos.offset); + const void *p = memchr((const char *)(scenario + json_pos.offset), '\n', (size_t)st.st_size - json_pos.offset); int linelen = p ? ((int)((unsigned char *)p - (scenario + json_pos.offset)) + (int)json_pos.column_number - 1) : (((int)st.st_size - (int)json_pos.offset) + (int)json_pos.column_number - 1); if (WOLFSENTRY_ERROR_DECODE_SOURCE_ID(ret) == WOLFSENTRY_SOURCE_ID_UNSET)