Resolve compiler warnings and udpate CFLAGS

This commit is contained in:
Night Kaly 2024-11-04 23:43:37 +00:00
parent 2e7a16299c
commit f9cb80907b
Signed by: night0721
SSH key fingerprint: SHA256:B/hgVwUoBpx5vdNsXl9w8XwZljA9766uk6T4ubZp5HM
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@ TARGET = slr
PREFIX ?= /usr/local PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
CFLAGS = -O3 -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall CFLAGS = -Os -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall -D_DEFAULT_SOURCE
SRC = slr.c lexer.c parser.c SRC = slr.c lexer.c parser.c

View file

@ -39,7 +39,7 @@ Token *lexer(char *buf)
current_index++; current_index++;
} }
tokens[tokens_index].type = END_OF_TOKENS; tokens[tokens_index].type = END_OF_TOKENS;
tokens[tokens_index].value = '\0'; tokens[tokens_index].value = NULL;
return tokens; return tokens;
} }