diff options
author | Andrew Waterman <andrew@sifive.com> | 2022-01-09 17:04:17 -0800 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2022-01-09 17:05:07 -0800 |
commit | d1a3a4255295b742728b8c851a222cfbf06e8116 (patch) | |
tree | 22b1f5d3175faff032308b4f4cc1bb187cc9498d /riscv/interactive.cc | |
parent | 39fc8c3921e8c9ffd9996a7d59df239b2488a206 (diff) | |
download | spike-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.cc | 6 |
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; |