aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-22 10:10:09 +0000
committerRoy Marples <roy@marples.name>2008-01-22 10:10:09 +0000
commite5baa6ad378a6cf7ddc7689163adfd8719d9946f (patch)
treeb05214c1b179e1ecb1fdf7c3bdb5d14100ac4967
parentcbe5648158b8243348de84cf8fb04c0be4f2ac11 (diff)
Quiet some lint warnings.
-rw-r--r--src/libeinfo/libeinfo.c11
1 files changed, 6 insertions, 5 deletions
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 <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdbool.h>
@@ -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