diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-13 02:27:31 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-13 02:27:31 +0000 |
commit | 77ad97f199f1bf05e9a7609bbdd239dab825b258 (patch) | |
tree | cf117ebf8d4a50bc7ba0e4da4d60a98a944756c8 /coreutils/cut.c | |
parent | c4f12f59cc907577d787f816b37122809f896bb2 (diff) | |
download | busybox-w32-77ad97f199f1bf05e9a7609bbdd239dab825b258.tar.gz busybox-w32-77ad97f199f1bf05e9a7609bbdd239dab825b258.tar.bz2 busybox-w32-77ad97f199f1bf05e9a7609bbdd239dab825b258.zip |
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 7a44d1088..1634fc8c8 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -64,7 +64,7 @@ static void cut_file(FILE *file, char delim) | |||
64 | /* print the chars specified in each cut list */ | 64 | /* print the chars specified in each cut list */ |
65 | for (; cl_pos < nlists; cl_pos++) { | 65 | for (; cl_pos < nlists; cl_pos++) { |
66 | spos = cut_lists[cl_pos].startpos; | 66 | spos = cut_lists[cl_pos].startpos; |
67 | while (spos < strlen(line)) { | 67 | while (spos < (int)strlen(line)) { |
68 | if (!printed[spos]) { | 68 | if (!printed[spos]) { |
69 | printed[spos] = 'X'; | 69 | printed[spos] = 'X'; |
70 | putchar(line[spos]); | 70 | putchar(line[spos]); |
@@ -80,12 +80,12 @@ static void cut_file(FILE *file, char delim) | |||
80 | 80 | ||
81 | /* get out if we have no more lists to process or if the lines | 81 | /* get out if we have no more lists to process or if the lines |
82 | * are lower than what we're interested in */ | 82 | * are lower than what we're interested in */ |
83 | if (linenum < spos || cl_pos >= nlists) | 83 | if (((int)linenum < spos) || (cl_pos >= nlists)) |
84 | goto next_line; | 84 | goto next_line; |
85 | 85 | ||
86 | /* if the line we're looking for is lower than the one we were | 86 | /* if the line we're looking for is lower than the one we were |
87 | * passed, it means we displayed it already, so move on */ | 87 | * passed, it means we displayed it already, so move on */ |
88 | while (spos < linenum) { | 88 | while (spos < (int)linenum) { |
89 | spos++; | 89 | spos++; |
90 | /* go to the next list if we're at the end of this one */ | 90 | /* go to the next list if we're at the end of this one */ |
91 | if (spos > cut_lists[cl_pos].endpos | 91 | if (spos > cut_lists[cl_pos].endpos |
@@ -97,7 +97,7 @@ static void cut_file(FILE *file, char delim) | |||
97 | spos = cut_lists[cl_pos].startpos; | 97 | spos = cut_lists[cl_pos].startpos; |
98 | /* get out if the current line is lower than the one | 98 | /* get out if the current line is lower than the one |
99 | * we just became interested in */ | 99 | * we just became interested in */ |
100 | if (linenum < spos) | 100 | if ((int)linenum < spos) |
101 | goto next_line; | 101 | goto next_line; |
102 | } | 102 | } |
103 | } | 103 | } |