diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-10-06 13:15:28 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-10-06 13:15:28 +0200 |
commit | 5f45b7d53361bd32ce390e12f814660a98f86aa9 (patch) | |
tree | 53612a69e99fcb3c30392e9b682da3b0ff844f3e /mscan.c | |
parent | ce9ac3aff4bd2fe58132c3ec194269abe4fda4a7 (diff) | |
download | mblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.tar.gz mblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.tar.xz mblaze-5f45b7d53361bd32ce390e12f814660a98f86aa9.zip |
use appropriate integer types
Mainly found with clang -Wconversion -Wshorten-64-to-32.
Diffstat (limited to 'mscan.c')
-rw-r--r-- | mscan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mscan.c b/mscan.c index 8d104ad..08dbc90 100644 --- a/mscan.c +++ b/mscan.c @@ -33,7 +33,7 @@ static time_t now; static char default_fflag[] = "%c%u%r %-3n %10d %17f %t %2i%s"; static char *fflag = default_fflag; -int +ssize_t u8putstr(FILE *out, char *s, ssize_t l, int pad) { ssize_t ol = l; @@ -109,7 +109,7 @@ numline(char *file) } static char * -fmt_date(struct message *msg, int w, int iso) +fmt_date(struct message *msg, long w, int iso) { static char date[32]; char *v; @@ -244,7 +244,7 @@ fmt_to_flag(struct message *msg) } static ssize_t -print_human(intmax_t i, int w) +print_human(intmax_t i, long w) { double d = i / 1024.0; const char *u = "\0\0M\0G\0T\0P\0E\0Z\0Y\0"; @@ -310,7 +310,7 @@ oneline(char *file) } f++; - int w = 0; + long w = 0; if ((*f >= '0' && *f <= '9') || *f == '-') { errno = 0; char *e; |