From: Michael D. Lowis Date: Wed, 15 Dec 2021 21:54:08 +0000 (-0500) Subject: tweaked optimization and fixed some errors X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=c7800b07c9b8b864f1b4aa27c4e75fcb93f95557;p=proto%2Faos.git tweaked optimization and fixed some errors --- diff --git a/bin/dial.c b/bin/dial.c index 21bd61b..7e41df8 100644 --- a/bin/dial.c +++ b/bin/dial.c @@ -20,7 +20,8 @@ int copy_data(int fromfd, int tofd, int events) long nread; if ((nread = read(fromfd, buf, sizeof(buf))) > 0) { - write(tofd, buf, nread); + long nwrite = write(tofd, buf, nread); + (void)nwrite; } else { diff --git a/config.mk b/config.mk index cf179ab..fa55ed3 100644 --- a/config.mk +++ b/config.mk @@ -3,7 +3,7 @@ OUTDIR = build BINDIR = $(OUTDIR)/bin CC = cc -CFLAGS = -g -Wall -Wextra -Werror +CFLAGS = -O2 -g -Wall -Wextra -Werror CPPFLAGS = -Iinc/ -I/usr/include/freetype2 AR = ar diff --git a/lib/a/Options_Parse.c b/lib/a/Options_Parse.c index 0852d14..754927e 100644 --- a/lib/a/Options_Parse.c +++ b/lib/a/Options_Parse.c @@ -9,7 +9,6 @@ static void HandleOption(int s, char* l, char* arg) } else { - printf(" --%s=%s\n", l, arg); set_option(s, l, arg); } }