ref: 95c4c9de216083ba784a4c9f7fb986531fc61b14
parent: 230c14015215e08cf5181efb662e5de3b8570773
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Aug 10 15:35:05 EDT 2020
aux/ms2, aux/na: fix warnings aux/na was comparing the return of putc with <0, when it should have been comparing against EOF, which is not specified as -ve. aux/ms2 was zero-extending the mask for the address when it should have been sign extended.
--- a/sys/src/cmd/aux/ms2.c
+++ b/sys/src/cmd/aux/ms2.c
@@ -18,7 +18,7 @@
int halfswap;
int srec = 2;
uvlong addr;
-ulong psize = 4096;
+uvlong psize = 4096;
Biobuf stdout;
Fhdr exech;
Biobuf *bio;
--- a/sys/src/cmd/aux/na/na.y
+++ b/sys/src/cmd/aux/na/na.y
@@ -826,7 +826,7 @@
va_start(ap, s);
fprintf(stderr, "%s: %d: ", yyfilename, yyline);
vfprintf(stderr, s, ap);
- if (putc('\n', stderr) < 0)+ if (putc('\n', stderr) == EOF) exits("io");errors++;
va_end(ap);
@@ -840,7 +840,7 @@
va_start(ap, s);
fprintf(stderr, "%s: %d: warning: ", yyfilename, yyline);
vfprintf(stderr, s, ap);
- if (putc('\n', stderr) < 0)+ if (putc('\n', stderr) == EOF) exits("io");warnings++;
va_end(ap);
--
⑨