diff options
author | Denis Vlasenko | 2008-05-13 02:27:31 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-05-13 02:27:31 +0000 |
commit | 77ad97f199f1bf05e9a7609bbdd239dab825b258 (patch) | |
tree | cf117ebf8d4a50bc7ba0e4da4d60a98a944756c8 /coreutils/cut.c | |
parent | c4f12f59cc907577d787f816b37122809f896bb2 (diff) | |
download | busybox-77ad97f199f1bf05e9a7609bbdd239dab825b258.zip busybox-77ad97f199f1bf05e9a7609bbdd239dab825b258.tar.gz |
more -Wall warning fixes from Cristian Ionescu-Idbohrn.
This time it resulted in small code changes:
function old new delta
nexpr 820 828 +8
tail_main 1200 1202 +2
wrapf 166 167 +1
parse_mount_options 227 209 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r-- | coreutils/cut.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c index 7a44d10..1634fc8 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c @@ -64,7 +64,7 @@ static void cut_file(FILE *file, char delim) /* print the chars specified in each cut list */ for (; cl_pos < nlists; cl_pos++) { spos = cut_lists[cl_pos].startpos; - while (spos < strlen(line)) { + while (spos < (int)strlen(line)) { if (!printed[spos]) { printed[spos] = 'X'; putchar(line[spos]); @@ -80,12 +80,12 @@ static void cut_file(FILE *file, char delim) /* get out if we have no more lists to process or if the lines * are lower than what we're interested in */ - if (linenum < spos || cl_pos >= nlists) + if (((int)linenum < spos) || (cl_pos >= nlists)) goto next_line; /* if the line we're looking for is lower than the one we were * passed, it means we displayed it already, so move on */ - while (spos < linenum) { + while (spos < (int)linenum) { spos++; /* go to the next list if we're at the end of this one */ if (spos > cut_lists[cl_pos].endpos @@ -97,7 +97,7 @@ static void cut_file(FILE *file, char delim) spos = cut_lists[cl_pos].startpos; /* get out if the current line is lower than the one * we just became interested in */ - if (linenum < spos) + if ((int)linenum < spos) goto next_line; } } |