fix Makefile CFLAGS for nix

This commit is contained in:
2025-11-24 22:59:09 -08:00
parent a03dd0c433
commit a359f4e6c4
2 changed files with 7 additions and 6 deletions

View File

@@ -3,8 +3,9 @@ KE_VERSION := devel
DEST := $(HOME)/.local/bin/$(TARGET) DEST := $(HOME)/.local/bin/$(TARGET)
CFLAGS := -Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g CFLAGS := -Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g
CFLAGS += -Wno-unused-result
CFLAGS += -D_DEFAULT_SOURCE -D_XOPEN_SOURCE CFLAGS += -D_DEFAULT_SOURCE -D_XOPEN_SOURCE
CFLAGS += -fsanitize=address -fno-omit-frame-pointer CFLAGS += -fsanitize=address -fno-omit-frame-pointer
LDFLAGS := -fsanitize=address LDFLAGS := -fsanitize=address

10
main.c
View File

@@ -828,8 +828,8 @@ delete_region(void)
void void
die(const char *s) die(const char *s)
{ {
write(STDOUT_FILENO, "\x1b[2J", 4); (void)write(STDOUT_FILENO, "\x1b[2J", 4);
write(STDOUT_FILENO, "\x1b[H", 3); (void)write(STDOUT_FILENO, "\x1b[H", 3);
perror(s); perror(s);
exit(1); exit(1);
@@ -2054,8 +2054,8 @@ void
display_clear(struct abuf *ab) display_clear(struct abuf *ab)
{ {
if (ab == NULL) { if (ab == NULL) {
write(STDOUT_FILENO, ESCSEQ "2J", 4); (void)write(STDOUT_FILENO, ESCSEQ "2J", 4);
write(STDOUT_FILENO, ESCSEQ "H", 3); (void)write(STDOUT_FILENO, ESCSEQ "H", 3);
} else { } else {
ab_append(ab, ESCSEQ "2J", 4); ab_append(ab, ESCSEQ "2J", 4);
ab_append(ab, ESCSEQ "H", 3); ab_append(ab, ESCSEQ "H", 3);
@@ -2269,7 +2269,7 @@ display_refresh(void)
/* ab_append(&ab, ESCSEQ "1;2H", 7); */ /* ab_append(&ab, ESCSEQ "1;2H", 7); */
ab_append(&ab, ESCSEQ "?25h", 6); ab_append(&ab, ESCSEQ "?25h", 6);
write(STDOUT_FILENO, ab.b, ab.len); (void)write(STDOUT_FILENO, ab.b, ab.len);
ab_free(&ab); ab_free(&ab);
} }