Index: iolib/dofmt.c
===================================================================
--- iolib/dofmt.c	(revision 7ecfb7b804af212fdc1cf5f5eebff4b5072b391b)
+++ iolib/dofmt.c	(revision 7d0d347348dae410c7ee7f2f968771753f70fdeb)
@@ -32,6 +32,4 @@
 #define	tonum(x)	((x)-'0')
 #define	todigit(x)	((x)+'0')
-#define	max(a,b)	((a)>(b)?(a):(b))
-#define	min(a,b)	((a)<(b)?(a):(b))
 
 int32_t dofmt_(int16_t (*putsub)(int16_t c), int8_t *format, va_list args)
@@ -71,5 +69,5 @@
 			;
 
-		if (n = (int32_t)format - (int32_t)bp) {
+		if ((n = (int32_t)format - (int32_t)bp)) {
 
 			count += n;
@@ -168,9 +166,10 @@
 		fixed:
 
-			if (prec < 0)
+			if (prec < 0) {
 				if (flzero AND width > 0)
 					prec = width;
 				else
 					prec = 1;
+			}
 
 			if (length)
@@ -265,9 +264,9 @@
 
 		default:
-			buf[0] = fcode;
+			buf[0] = (int8_t)fcode;
 			goto c_merge;
 
 		case 'c':
-			buf[0] = va_arg(args, int16_t);
+			buf[0] = (int8_t)va_arg(args, int16_t);
 
 		c_merge:
Index: iolib/mdump.c
===================================================================
--- iolib/mdump.c	(revision 7ecfb7b804af212fdc1cf5f5eebff4b5072b391b)
+++ iolib/mdump.c	(revision 7d0d347348dae410c7ee7f2f968771753f70fdeb)
@@ -50,5 +50,5 @@
 */
 
-void mdump(int8_t *begin, int8_t *end, int32_t start)
+void mdump(int8_t *from, int8_t *to, int32_t start)
 {
 	int32_t	i, ii;
@@ -60,10 +60,10 @@
 	j = 0;
 
-	if (begin GT end)
+	if (from GT to)
 		return;
 
-	while (begin LE end) {
+	while (from LE to) {
 
-		c = *begin++;
+		c = *from++;
 
 		if (! (i % PERLINE)) {
@@ -86,5 +86,5 @@
 	}
 
-	if (k = (i % PERLINE)) {
+	if ((k = (int16_t)(i % PERLINE))) {
 
 		k = PERLINE - k;
Index: iolib/rawio.c
===================================================================
--- iolib/rawio.c	(revision 7ecfb7b804af212fdc1cf5f5eebff4b5072b391b)
+++ iolib/rawio.c	(revision 7d0d347348dae410c7ee7f2f968771753f70fdeb)
@@ -75,5 +75,5 @@
 	for (i = 0; i < nb; i++) {	/* main read loop */
 
-		c = BIOS(B_GETC, unit) & 0xFF;	/* get a byte from the unit */
+		c = (int8_t)(BIOS(B_GETC, unit) & 0xFF);	/* get a byte from the unit */
 
 		*bp++ = c;	/* add it to the buffer */
@@ -104,5 +104,5 @@
 	while (bc LT nb) {
 
-		c = BIOS(B_GETC, unit) & 0xFF;
+		c = (int8_t)(BIOS(B_GETC, unit) & 0xFF);
 
 		switch (c) {
@@ -163,5 +163,5 @@
 	while (bc LT nb) {
 
-		c = BIOS(B_GETC, unit) & 0xFF;
+		c = (int8_t)(BIOS(B_GETC, unit) & 0xFF);
 
 		switch (c) {
@@ -198,5 +198,5 @@
 	bp = buf;	/* setup buffer pointer */
 
-	while (c = *bp++)	/* send the string, a byte at a time */
+	while ((c = *bp++))	/* send the string, a byte at a time */
 		BIOS(B_PUTC, unit, c);
 }
Index: iolib/sprintf.c
===================================================================
--- iolib/sprintf.c	(revision 7ecfb7b804af212fdc1cf5f5eebff4b5072b391b)
+++ iolib/sprintf.c	(revision 7d0d347348dae410c7ee7f2f968771753f70fdeb)
@@ -38,4 +38,4 @@
 static int16_t spsub(int16_t c)
 {
-	return((*buff++ = c) & 0xFF);
+	return((*buff++ = (int8_t)c) & 0xFF);
 }
