From ab6dc14c2ea35d6c1a0415dbfafe7dd503c989db Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 2 Aug 2019 13:21:55 -0400 Subject: compile cleanly with warnings reeanbled --- Makefile | 2 +- sh.l | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 20b847d..ab09d20 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ default: all -CFLAGS=-g -Wall -Wextra -Wpedantic -Werror -Wno-unused-function -Wno-sign-compare +CFLAGS=-g -Wall -Wextra -Wpedantic -Werror UTILITY=sh SOURCES=alias.c bg.c builtins.c cd.c command.c false.c fc.c fg.c getopts.c \ diff --git a/sh.l b/sh.l index 539a251..c38ea7c 100644 --- a/sh.l +++ b/sh.l @@ -63,3 +63,10 @@ OPERATOR [()|;&<>] [^ \t\n()|;&<>]+ { yylval.s = yytext; return WORD; } {WHITESPACE} ; + +%% +void sh_silence_warning(void) +{ + input(); + yyunput(0, 0); +} -- cgit v1.2.1