diff options
author | monty@mysql.com/nosik.monty.fi <> | 2006-11-27 18:16:08 +0200 |
---|---|---|
committer | monty@mysql.com/nosik.monty.fi <> | 2006-11-27 18:16:08 +0200 |
commit | 0e149b717029cf5ee5b34b3f7c5249cc534a3e1c (patch) | |
tree | 20c7910ad3251fb39027f6528cd4c0524220a1a0 /cmd-line-utils | |
parent | 313f23a93af801ca368fd5f3123f952ab2b8da68 (diff) | |
download | mariadb-git-0e149b717029cf5ee5b34b3f7c5249cc534a3e1c.tar.gz |
Removed compiler warnings
Ensure that my_size_t is always unsigned (to get predictiable results from system to system)
Removed some %lld, as these are not portable
Diffstat (limited to 'cmd-line-utils')
-rw-r--r-- | cmd-line-utils/readline/bind.c | 3 | ||||
-rw-r--r-- | cmd-line-utils/readline/histfile.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/cmd-line-utils/readline/bind.c b/cmd-line-utils/readline/bind.c index ab1136c7da5..3e2a72375d3 100644 --- a/cmd-line-utils/readline/bind.c +++ b/cmd-line-utils/readline/bind.c @@ -735,7 +735,8 @@ _rl_read_file (filename, sizep) file_size = (size_t)finfo.st_size; /* check for overflow on very large files */ - if (file_size != finfo.st_size || file_size + 1 < file_size) + if ((long long) file_size != (long long) finfo.st_size || + file_size + 1 < file_size) { if (file >= 0) close (file); diff --git a/cmd-line-utils/readline/histfile.c b/cmd-line-utils/readline/histfile.c index 7d340b346d4..f1822b105a4 100644 --- a/cmd-line-utils/readline/histfile.c +++ b/cmd-line-utils/readline/histfile.c @@ -184,7 +184,8 @@ read_history_range (filename, from, to) file_size = (size_t)finfo.st_size; /* check for overflow on very large files */ - if (file_size != finfo.st_size || file_size + 1 < file_size) + if ((long long) file_size != (long long) finfo.st_size || + file_size + 1 < file_size) { errno = overflow_errno; goto error_and_exit; @@ -333,7 +334,8 @@ history_truncate_file (fname, lines) file_size = (size_t)finfo.st_size; /* check for overflow on very large files */ - if (file_size != finfo.st_size || file_size + 1 < file_size) + if ((long long) file_size != (long long) finfo.st_size || + file_size + 1 < file_size) { close (file); #if defined (EFBIG) |