toys/other/vmstat.c:98:12: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] if ((!toys.optflags&FLAG_n) && isatty(1)) terminal_size(0, &rows); ^ ~ --- toys/other/vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From 901a0fa46974d0e9453492de5580092e36341ee0 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <e...@google.com> Date: Wed, 4 Apr 2018 10:01:22 -0700 Subject: [PATCH] Fix precedence error in vmstat.
toys/other/vmstat.c:98:12: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] if ((!toys.optflags&FLAG_n) && isatty(1)) terminal_size(0, &rows); ^ ~ --- toys/other/vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/other/vmstat.c b/toys/other/vmstat.c index 8e131d9..44f73d4 100644 --- a/toys/other/vmstat.c +++ b/toys/other/vmstat.c @@ -95,7 +95,7 @@ void vmstat_main(void) if (rows>3 && !(loop % (rows-3))) { char *header = headers; - if ((!toys.optflags&FLAG_n) && isatty(1)) terminal_size(0, &rows); + if (!(toys.optflags&FLAG_n) && isatty(1)) terminal_size(0, &rows); else rows = 0; printf("procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----\n"); -- 2.17.0.484.g0c8726318c-goog
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net