From 5be69e64cfd17b20c0c7fef3b3e2983cf69e8645 Mon Sep 17 00:00:00 2001 From: Fabrice Date: Tue, 10 Feb 2026 10:21:18 +0100 Subject: fix types and use dep files --- Makefile | 12 ++++++++++-- src/hashm.h | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ec9ee02..a80043d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ WORK_DIR = . SRC_DIR = $(WORK_DIR)/src -CSH_FLAGS = -O2 -g -Wall -Wextra -Werror -pedantic -I$(SRC_DIR) +CSH_FLAGS = \ + -O2 -g \ + -Wall -Wextra -Werror -pedantic \ + -MMD -MP \ + -I$(SRC_DIR) CC = clang CC_STD = -std=c11 @@ -50,6 +54,8 @@ OBJECTS := $(SOURCES:.cc=.o) OBJECTS := $(OBJECTS:.c=.o) OBJECTS += $(MI_OBJECT) +DEPS = $(OBJECTS:.o=.d) + LIBRARIES = -lwayland-client all: $(WAYCLOCK) @@ -77,4 +83,6 @@ $(WAYCLOCK): $(OBJECTS) .PHONY: clean clean: @$(RM) $(OBJECTS) $(WAYCLOCK) - @$(RM) $(MI_BUILD) \ No newline at end of file + @$(RM) $(MI_BUILD) + +-include $(DEPS) \ No newline at end of file diff --git a/src/hashm.h b/src/hashm.h index fb83391..e1ed720 100644 --- a/src/hashm.h +++ b/src/hashm.h @@ -14,7 +14,7 @@ template struct hashentry_s { }; template -inline i32 wayc_hashentry_hash(const void *item, uint64_t seed0, +inline u64 wayc_hashentry_hash(const void *item, uint64_t seed0, uint64_t seed1) { wayc_notnull(item); @@ -23,7 +23,7 @@ inline i32 wayc_hashentry_hash(const void *item, uint64_t seed0, } template -inline bool wayc_hashentry_compare(const void *a, const void *b, void *udata) { +inline i32 wayc_hashentry_compare(const void *a, const void *b, void *udata) { (void)udata; wayc_notnull(a); -- cgit v1.2.3