From e6fb7d946102aa175d85a95db21974f85b243dab Mon Sep 17 00:00:00 2001 From: ru Date: Sat, 15 Mar 2003 13:34:48 +0000 Subject: ssize_t is not required to be the same width as size_t by the specs, so cast to intmax_t where appropriate. Pointed out by: bde --- bin/dd/args.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'bin/dd') diff --git a/bin/dd/args.c b/bin/dd/args.c index 7e66b7f..b629b3a 100644 --- a/bin/dd/args.c +++ b/bin/dd/args.c @@ -189,7 +189,7 @@ f_bs(char *arg) res = get_num(arg); if (res < 1 || res > SSIZE_MAX) - errx(1, "bs must be between 1 and %zd", SSIZE_MAX); + errx(1, "bs must be between 1 and %jd", (intmax_t)SSIZE_MAX); in.dbsz = out.dbsz = (size_t)res; } @@ -200,7 +200,7 @@ f_cbs(char *arg) res = get_num(arg); if (res < 1 || res > SSIZE_MAX) - errx(1, "cbs must be between 1 and %zd", SSIZE_MAX); + errx(1, "cbs must be between 1 and %jd", (intmax_t)SSIZE_MAX); cbsz = (size_t)res; } @@ -235,7 +235,8 @@ f_ibs(char *arg) if (!(ddflags & C_BS)) { res = get_num(arg); if (res < 1 || res > SSIZE_MAX) - errx(1, "ibs must be between 1 and %zd", SSIZE_MAX); + errx(1, "ibs must be between 1 and %jd", + (intmax_t)SSIZE_MAX); in.dbsz = (size_t)res; } } @@ -255,7 +256,8 @@ f_obs(char *arg) if (!(ddflags & C_BS)) { res = get_num(arg); if (res < 1 || res > SSIZE_MAX) - errx(1, "obs must be between 1 and %zd", SSIZE_MAX); + errx(1, "obs must be between 1 and %jd", + (intmax_t)SSIZE_MAX); out.dbsz = (size_t)res; } } -- cgit v1.1