Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Makefile.analyzers
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ sanitize-all-NO_POSIX_MEMALIGN-gcc:
@echo "passed: no defects from gcc NO_POSIX_MEMALIGN sanitize address, leak, undefined, float-cast-overflow, float-divide-by-zero, and bounds-strict"
@$(MAKE) $(EXTRA_MAKE_FLAGS) $(QUIET_FLAG) -f $(THIS_MAKEFILE) VERY_QUIET=1 BUILD_TOP="$(BUILD_PARENT)/wolfsentry-sanitizer-NO_POSIX_MEMALIGN-builds-gcc" clean

.PHONY: sanitize-aarch64-be-test
sanitize-aarch64-be-test:
@$(MAKE) $(EXTRA_MAKE_FLAGS) $(QUIET_FLAG) -f $(THIS_MAKEFILE) VERY_QUIET=1 BUILD_TOP="$(BUILD_PARENT)/wolfsentry-sanitize-aarch64-be-builds" clean
@HOST=aarch64_be-unknown-linux-gnu; \
.PHONY: sanitize-armeb-test
sanitize-armeb-test:
@$(MAKE) $(EXTRA_MAKE_FLAGS) $(QUIET_FLAG) -f $(THIS_MAKEFILE) VERY_QUIET=1 BUILD_TOP="$(BUILD_PARENT)/wolfsentry-sanitize-armeb-builds" clean
@HOST=armeb-linux-gnueabihf; \
HOST_RPATH=$$(dirname $$($${HOST}-gcc -print-libgcc-file-name)) && \
$(MAKE) $(EXTRA_MAKE_FLAGS) $(QUIET_FLAG) -f $(THIS_MAKEFILE) VERY_QUIET=1 BUILD_TOP="$(BUILD_PARENT)/wolfsentry-sanitize-aarch64-be-builds" HOST=$$HOST EXE_LAUNCHER="qemu-aarch64_be -E LD_LIBRARY_PATH=$${HOST_RPATH} -L /usr/aarch64_be-unknown-linux-gnu" EXTRA_CFLAGS+='-fno-sanitize-recover=all' EXTRA_LDFLAGS="-Wl,-rpath-link=$$HOST_RPATH -Wl,-rpath=$$HOST_RPATH" sanitize-no-leak
@$(MAKE) $(EXTRA_MAKE_FLAGS) $(QUIET_FLAG) -f $(THIS_MAKEFILE) VERY_QUIET=1 BUILD_TOP="$(BUILD_PARENT)/wolfsentry-sanitize-aarch64-be-builds" clean
@echo "passed: sanitize-aarch64-be test."
$(MAKE) $(EXTRA_MAKE_FLAGS) $(QUIET_FLAG) -f $(THIS_MAKEFILE) VERY_QUIET=1 BUILD_TOP="$(BUILD_PARENT)/wolfsentry-sanitize-armeb-builds" HOST=$$HOST EXE_LAUNCHER="qemu-armeb -E LD_LIBRARY_PATH=$${HOST_RPATH} -L /usr/armeb-linux-gnueabihf" EXTRA_CFLAGS+='-fno-sanitize-recover=all' EXTRA_LDFLAGS="-Wl,-rpath-link=$$HOST_RPATH -Wl,-rpath=$$HOST_RPATH -latomic" sanitize-no-leak
@$(MAKE) $(EXTRA_MAKE_FLAGS) $(QUIET_FLAG) -f $(THIS_MAKEFILE) VERY_QUIET=1 BUILD_TOP="$(BUILD_PARENT)/wolfsentry-sanitize-armeb-builds" clean
@echo "passed: sanitize-armeb test."

.PHONY: sanitize-all-clang
sanitize-all-clang: clang-version-test
Expand Down Expand Up @@ -286,7 +286,7 @@ cppcheck-force: cppcheck-force-library cppcheck-force-extras
.PHONY: analyze-all
# valgrind-all-clang disabled until the valgrind team fixes https://bugs.kde.org/show_bug.cgi?id=452758
# "Valgrind does not read properly DWARF5 as generated by Clang14"
analyze-all: valgrind-all-gcc sanitize-all-gcc linux-lwip-sanitize-all-gcc sanitize-all-clang sanitize-aarch64-be-test sanitize-all-no-inline-gcc sanitize-all-NO_POSIX_MEMALIGN-gcc clang-tidy-build-test cppcheck-library cppcheck-extras
analyze-all: valgrind-all-gcc sanitize-all-gcc linux-lwip-sanitize-all-gcc sanitize-all-clang sanitize-armeb-test sanitize-all-no-inline-gcc sanitize-all-NO_POSIX_MEMALIGN-gcc clang-tidy-build-test cppcheck-library cppcheck-extras
@echo 'passed: analyzers found no defects.'

.PHONY: analyze-macosx
Expand Down Expand Up @@ -878,12 +878,12 @@ $(BUILD_TOP)/tests/coverage-unittest.o: $(SRC_TOP)/tests/unittests.c
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
@rm -f $(@:.o=.gcda)
ifeq "$(V)" "1"
$(CC) $(CFLAGS) -MF $(<:.c=.d) -c $< -o $@
$(CC) $(CFLAGS) -MMD -MF $(<:.c=.d) -c $< -o $@
else
ifndef VERY_QUIET
@echo "$(CC) ... -o $@"
endif
@$(CC) $(CFLAGS) -MF $(<:.c=.d) -c $< -o $@
@$(CC) $(CFLAGS) -MMD -MF $(<:.c=.d) -c $< -o $@
endif

.PHONY: gcovr
Expand Down
2 changes: 1 addition & 1 deletion src/json/centijson_value.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ json_value_path(JSON_VALUE* root, const char* path)

token_beg++;
while('0' <= *token_beg && *token_beg <= '9') {
path_index = path_index * 10U + (*token_beg - (unsigned)'0');
path_index = (path_index * 10U) + (*token_beg - (unsigned)'0');
token_beg++;
}
if(*token_beg != ']')
Expand Down
2 changes: 1 addition & 1 deletion src/wolfsentry_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static const struct {
{ WOLFSENTRY_ACTION_RES_USER7, "user+7" }
};

wolfsentry_static_assert(length_of_array(action_res_bit_map) == 1U + sizeof(wolfsentry_action_res_t) * BITS_PER_BYTE)
wolfsentry_static_assert(length_of_array(action_res_bit_map) == 1U + (sizeof(wolfsentry_action_res_t) * BITS_PER_BYTE))

WOLFSENTRY_API const char *wolfsentry_action_res_assoc_by_flag(wolfsentry_action_res_t res, unsigned int bit) {
if (bit > 31)
Expand Down
2 changes: 1 addition & 1 deletion wolfsentry/wolfsentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct wolfsentry_allocator {
/*!< \brief Required pointer. */
wolfsentry_memalign_cb_t memalign;
/*!< \brief Optional pointer.
* Required only if a `struct wolfsentry_eventconfig` is passed in (e.g. to wolfsentry_init()`) with a nonzero `route_private_data_alignment`.
* Required only if a `struct wolfsentry_eventconfig` is passed in (e.g. to `wolfsentry_init()`) with a nonzero `route_private_data_alignment`.
*/
wolfsentry_free_aligned_cb_t free_aligned;
/*!< \brief Optional pointer. Required (and allowed) only if `memalign` pointer is non-null. */
Expand Down