From c7800b07c9b8b864f1b4aa27c4e75fcb93f95557 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Wed, 15 Dec 2021 16:54:08 -0500 Subject: [PATCH] tweaked optimization and fixed some errors --- bin/dial.c | 3 ++- config.mk | 2 +- lib/a/Options_Parse.c | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) 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); } } -- 2.55.0