aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cut.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r--coreutils/cut.c8
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 }