From f9cb80907b04450356f81d4db1d0b877f59d1d11 Mon Sep 17 00:00:00 2001 From: night0721 Date: Mon, 4 Nov 2024 23:43:37 +0000 Subject: [PATCH] Resolve compiler warnings and udpate CFLAGS --- Makefile | 2 +- lexer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cd5a04a..a20b18f 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ TARGET = slr PREFIX ?= /usr/local 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 diff --git a/lexer.c b/lexer.c index c21f340..cbc0e07 100644 --- a/lexer.c +++ b/lexer.c @@ -39,7 +39,7 @@ Token *lexer(char *buf) current_index++; } tokens[tokens_index].type = END_OF_TOKENS; - tokens[tokens_index].value = '\0'; + tokens[tokens_index].value = NULL; return tokens; }