aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/find.c2
-rw-r--r--toys/posix/printf.c2
-rw-r--r--toys/posix/sed.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/toys/posix/find.c b/toys/posix/find.c
index 370220e8..6c45a212 100644
--- a/toys/posix/find.c
+++ b/toys/posix/find.c
@@ -165,7 +165,7 @@ char *strlower(char *s)
// encode back to utf8, something is wrong with your libc. But just
// in case somebody finds an exploit...
len = wcrtomb(new, c, 0);
- if (len < 1) error_exit("bad utf8 %x", c);
+ if (len < 1) error_exit("bad utf8 %x", (int)c);
new += len;
}
}
diff --git a/toys/posix/printf.c b/toys/posix/printf.c
index 1c2c5471..4c9de286 100644
--- a/toys/posix/printf.c
+++ b/toys/posix/printf.c
@@ -130,7 +130,7 @@ void printf_main(void)
sprintf(to, "*.*L%c", c);
printf(toybuf, wp[0], wp[1], ld);
- } else error_exit("bad %%%c@%ld", c, f-*toys.optargs);
+ } else error_exit("bad %%%c@%ld", c, (long)(f-*toys.optargs));
if (end && (errno || *end)) perror_msg("bad %%%c %s", c, aa);
}
diff --git a/toys/posix/sed.c b/toys/posix/sed.c
index 628953c5..dc3c8d91 100644
--- a/toys/posix/sed.c
+++ b/toys/posix/sed.c
@@ -997,7 +997,7 @@ resume_a:
brand:
// Reminisce about chestnut trees.
- error_exit("bad pattern '%s'@%ld (%c)", errstart, line-errstart+1, *line);
+ error_exit("bad pattern '%s'@%ld (%c)", errstart, line-errstart+1L, *line);
}
void sed_main(void)