Compare commits

...

2 commits

Author SHA1 Message Date
Imbus
e0d5d7e809 Remove static from prand_range 2025-12-28 05:28:01 +01:00
Imbus
1be2fa0339 Stop silencing errors 2025-12-28 05:27:28 +01:00
2 changed files with 5 additions and 17 deletions

View file

@ -1,12 +1,5 @@
.SILENT:
CC := gcc
CFLAGS := -Wall -Wextra -O2
# Silence some errors/warnings for now
CFLAGS += -Wno-implicit-fallthrough
CFLAGS += -Wno-strict-aliasing
CFLAGS += -Wno-uninitialized
CC ?= gcc
CFLAGS := -Wall -Wextra -ggdb
SRC := $(wildcard *.c)
OBJ := $(SRC:.c=.o)
@ -25,17 +18,12 @@ SUBDIRS += socket
SUBDIRS += sqlite
%.o: %.c
@echo CC $@
@$(CC) $(CFLAGS) -c -o $@ $<
$(CC) $(CFLAGS) -c -o $@ $<
%.elf: %.o
@echo LD $@
@$(CC) $(LIBS) -o $@ $<
$(CC) $(LIBS) -o $@ $<
all: $(ELF)
# @for dir in $(SUBDIRS); do \
# $(MAKE) -C $$dir; \
# done
sub:
@-find . -mindepth 1 -maxdepth 1 -type d -exec make --no-print-directory -C {} \;

View file

@ -15,7 +15,7 @@ uint64_t prand() {
return seed;
}
inline uint64_t prand_range(uint64_t min, uint64_t max) {
uint64_t prand_range(uint64_t min, uint64_t max) {
uint64_t range = max - min + 1;
uint64_t x;
uint64_t limit = UINT64_MAX - (UINT64_MAX % range);