From e5baa6ad378a6cf7ddc7689163adfd8719d9946f Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 22 Jan 2008 10:10:09 +0000 Subject: Quiet some lint warnings. --- src/libeinfo/libeinfo.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/libeinfo') diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c index 82805f85..eec7798f 100644 --- a/src/libeinfo/libeinfo.c +++ b/src/libeinfo/libeinfo.c @@ -36,6 +36,7 @@ const char libeinfo_copyright[] = "Copyright (c) 2007-2008 Roy Marples"; #include #include #include +#include #include #include #include @@ -465,7 +466,7 @@ static int get_term_columns (FILE * __EINFO_RESTRICT stream) int i; if (env) { - i = strtol (env, &p, 10); + i = strtoimax (env, &p, 10); if (! *p) return (i); } @@ -515,14 +516,14 @@ static int _eindent (FILE * __EINFO_RESTRICT stream) if (env) { errno = 0; - amount = strtol (env, NULL, 0); + amount = strtoimax (env, NULL, 0); if (errno != 0 || amount < 0) amount = 0; else if (amount > INDENT_MAX) amount = INDENT_MAX; if (amount > 0) - memset (indent, ' ', amount); + memset (indent, ' ', (size_t) amount); } /* Terminate it */ @@ -883,7 +884,7 @@ void eindent (void) if (env) { errno = 0; - amount = strtol (env, NULL, 0); + amount = strtoimax (env, NULL, 0); if (errno != 0) amount = 0; } @@ -907,7 +908,7 @@ void eoutdent (void) return; errno = 0; - amount = strtol (env, NULL, 0); + amount = strtoimax (env, NULL, 0); if (errno != 0) amount = 0; else -- cgit v1.2.3