summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWormHeamer2025-12-28 23:59:33 -0500
committerWormHeamer2025-12-28 23:59:33 -0500
commit01ed23855e2c53b7286a58d960592a21edaaa086 (patch)
tree0c5622ea850560860ae688fde2b9c9abfcaca805 /main.c
parent6d1b9abeae25d886cd976839bbf32fe220279fd1 (diff)
fix a couple unused var warnings
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.c b/main.c
index 703454d..17ab1bb 100644
--- a/main.c
+++ b/main.c
@@ -138,12 +138,15 @@ int shell_replace(TxtLoc start, TxtLoc end, const char *cmd) {
TxtLoc l = start;
while (txt_before(l, end)) {
char c = txt_byte(l);
- ASSERT(write(in, &c, 1) == 1);
+ if (write(in, &c, 1) != 1) {
+ close(in);
+ close(out);
+ return -1;
+ }
l = bnext(l);
}
close(in);
- char c = 0;
txt_delete_range(start, end);
DYNARR(char) buf = { 0 };
DA_AFIT(&buf, &scratch, 1024);
@@ -420,7 +423,6 @@ int main(int argc, const char **argv) {
/* fallthrough */
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
-add_to_count:
count = (count % 100000000) * 10 + c - '0';
break;
case 'M': {