aboutsummaryrefslogtreecommitdiff
path: root/riscv/interactive.cc
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2022-01-09 17:04:17 -0800
committerAndrew Waterman <andrew@sifive.com>2022-01-09 17:05:07 -0800
commitd1a3a4255295b742728b8c851a222cfbf06e8116 (patch)
tree22b1f5d3175faff032308b4f4cc1bb187cc9498d /riscv/interactive.cc
parent39fc8c3921e8c9ffd9996a7d59df239b2488a206 (diff)
downloadspike-d1a3a4255295b742728b8c851a222cfbf06e8116.zip
spike-d1a3a4255295b742728b8c851a222cfbf06e8116.tar.gz
spike-d1a3a4255295b742728b8c851a222cfbf06e8116.tar.bz2
Changes to be cleaner wrt. -Wextra
h/t @jerinjoy See #901
Diffstat (limited to 'riscv/interactive.cc')
-rw-r--r--riscv/interactive.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/riscv/interactive.cc b/riscv/interactive.cc
index dc6837d..172cd33 100644
--- a/riscv/interactive.cc
+++ b/riscv/interactive.cc
@@ -50,11 +50,9 @@ static std::string readline(int fd)
continue;
s.erase(s.end()-1);
- if (noncanonical && write(fd, "\b \b", 3) != 3)
- ; // shut up gcc
+ if (noncanonical && write(fd, "\b \b", 3) != 3) {}
}
- else if (noncanonical && write(fd, &ch, 1) != 1)
- ; // shut up gcc
+ else if (noncanonical && write(fd, &ch, 1) != 1) {}
if (ch == '\n')
break;