Compare commits

..

2 Commits

Author SHA1 Message Date
Nils O. Selåsdal 24718b4956 Makefile: track dependencies for tests 2026-05-12 00:01:32 +02:00
Nils O. Selåsdal 7687ffa710 Fix attribute 2026-05-12 00:01:20 +02:00
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -12,10 +12,10 @@ endif
BUILDDIR = build BUILDDIR = build
SOURCES = $(wildcard src/*.c) SOURCES = $(wildcard src/*.c)
OBJECTS = $(addprefix $(BUILDDIR)/,$(SOURCES:.c=.o))
DEPS = $(addprefix $(BUILDDIR)/,$(SOURCES:.c=.d))
LIB = liblilalloc
TEST_SOURCES = $(wildcard test/*.c) TEST_SOURCES = $(wildcard test/*.c)
OBJECTS = $(addprefix $(BUILDDIR)/,$(SOURCES:.c=.o))
DEPS = $(addprefix $(BUILDDIR)/,$(SOURCES:.c=.d)) $(addprefix $(BUILDDIR)/,$(TEST_SOURCES:.c=.d))
LIB = liblilalloc
TEST_BINS = $(patsubst test/%.c,$(BUILDDIR)/test/%,$(TEST_SOURCES)) TEST_BINS = $(patsubst test/%.c,$(BUILDDIR)/test/%,$(TEST_SOURCES))
.PHONY: all .PHONY: all
+2 -1
View File
@@ -152,7 +152,8 @@ static inline void *larena_alloc(LArena *arena, size_t sz)
// Allocate @sz bytes from the LArena, returned pointer is aligned to @align // Allocate @sz bytes from the LArena, returned pointer is aligned to @align
// Returns NULL if not enough space // Returns NULL if not enough space
static inline void *larena_alloc_aligned(LArena *arena, size_t sz, unsigned int align) [[gnu::alloc_align(3)]] [[gnu::alloc_align(3)]]
static inline void *larena_alloc_aligned(LArena *arena, size_t sz, unsigned int align)
{ {
assert(align != 0); assert(align != 0);
assert((align & (align - 1)) == 0); // power of 2 assert((align & (align - 1)) == 0); // power of 2