From 5a68f769ddbc7847fb19cd4333fb09ed4aa5a003 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:38:34 -0700 Subject: [PATCH] Improve 1988/westley/demo.sh In addition to exiting (1) on compilation error (rather than trying to run the program) don't use -Wall -Wextra and don't redirect stderr to /dev/null. This way if there ever is a problem compiling it can be seen. Another option might be to first check if the program is already compiled but this might not be that important. This can be determined later. --- 1988/westley/demo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1988/westley/demo.sh b/1988/westley/demo.sh index 050823120..b14f9975e 100755 --- a/1988/westley/demo.sh +++ b/1988/westley/demo.sh @@ -7,7 +7,7 @@ cat westley.c sleep 1 echo "$ cc westley.c -o westley" -cc -std=gnu89 -Wall -Wextra -pedantic -Wno-error -Wno-implicit-function-declaration -Wno-return-type -O3 westley.c -o westley 2>/dev/null +cc -std=gnu89 -Wno-error -Wno-implicit-function-declaration -Wno-return-type -O3 westley.c -o westley || exit 1 echo "$ ./westley" ./westley