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 /libbb | |
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 'libbb')
-rw-r--r-- | libbb/lineedit.c | 8 | ||||
-rw-r--r-- | libbb/md5.c | 2 | ||||
-rw-r--r-- | libbb/read.c | 4 | ||||
-rw-r--r-- | libbb/u_signal_names.c | 4 | ||||
-rw-r--r-- | libbb/xfuncs_printf.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index d1a7a4bac..62dcc55cd 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -262,7 +262,7 @@ static void input_backward(unsigned num) | |||
262 | return; | 262 | return; |
263 | cursor -= num; | 263 | cursor -= num; |
264 | 264 | ||
265 | if (cmdedit_x >= num) { | 265 | if ((unsigned)cmdedit_x >= num) { |
266 | cmdedit_x -= num; | 266 | cmdedit_x -= num; |
267 | if (num <= 4) { | 267 | if (num <= 4) { |
268 | /* This is longer by 5 bytes on x86. | 268 | /* This is longer by 5 bytes on x86. |
@@ -321,7 +321,7 @@ static void input_delete(int save) | |||
321 | { | 321 | { |
322 | int j = cursor; | 322 | int j = cursor; |
323 | 323 | ||
324 | if (j == command_len) | 324 | if (j == (int)command_len) |
325 | return; | 325 | return; |
326 | 326 | ||
327 | #if ENABLE_FEATURE_EDITING_VI | 327 | #if ENABLE_FEATURE_EDITING_VI |
@@ -830,7 +830,7 @@ static void input_tab(smallint *lastWasTab) | |||
830 | 830 | ||
831 | if (!*lastWasTab) { | 831 | if (!*lastWasTab) { |
832 | char *tmp, *tmp1; | 832 | char *tmp, *tmp1; |
833 | int len_found; | 833 | size_t len_found; |
834 | /* char matchBuf[MAX_LINELEN]; */ | 834 | /* char matchBuf[MAX_LINELEN]; */ |
835 | #define matchBuf (S.input_tab__matchBuf) | 835 | #define matchBuf (S.input_tab__matchBuf) |
836 | int find_type; | 836 | int find_type; |
@@ -1787,7 +1787,7 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t | |||
1787 | if (vi_cmdmode) /* Don't self-insert */ | 1787 | if (vi_cmdmode) /* Don't self-insert */ |
1788 | break; | 1788 | break; |
1789 | #endif | 1789 | #endif |
1790 | if (command_len >= (maxsize - 2)) /* Need to leave space for enter */ | 1790 | if ((int)command_len >= (maxsize - 2)) /* Need to leave space for enter */ |
1791 | break; | 1791 | break; |
1792 | 1792 | ||
1793 | command_len++; | 1793 | command_len++; |
diff --git a/libbb/md5.c b/libbb/md5.c index 56f97270d..8d4b9fe52 100644 --- a/libbb/md5.c +++ b/libbb/md5.c | |||
@@ -383,7 +383,7 @@ void md5_hash(const void *buffer, size_t len, md5_ctx_t *ctx) | |||
383 | // Process all input. | 383 | // Process all input. |
384 | 384 | ||
385 | while (len) { | 385 | while (len) { |
386 | int i = 64 - ctx->buflen; | 386 | unsigned i = 64 - ctx->buflen; |
387 | 387 | ||
388 | // Copy data into aligned buffer. | 388 | // Copy data into aligned buffer. |
389 | 389 | ||
diff --git a/libbb/read.c b/libbb/read.c index 288358d79..fb903c18a 100644 --- a/libbb/read.c +++ b/libbb/read.c | |||
@@ -111,7 +111,7 @@ void xread(int fd, void *buf, size_t count) | |||
111 | { | 111 | { |
112 | if (count) { | 112 | if (count) { |
113 | ssize_t size = full_read(fd, buf, count); | 113 | ssize_t size = full_read(fd, buf, count); |
114 | if (size != count) | 114 | if ((size_t)size != count) |
115 | bb_error_msg_and_die("short read"); | 115 | bb_error_msg_and_die("short read"); |
116 | } | 116 | } |
117 | } | 117 | } |
@@ -160,7 +160,7 @@ char *xmalloc_reads(int fd, char *buf, size_t *maxsz_p) | |||
160 | 160 | ||
161 | goto jump_in; | 161 | goto jump_in; |
162 | while (sz < maxsz) { | 162 | while (sz < maxsz) { |
163 | if (p - buf == sz) { | 163 | if ((size_t)(p - buf) == sz) { |
164 | jump_in: | 164 | jump_in: |
165 | buf = xrealloc(buf, sz + 128); | 165 | buf = xrealloc(buf, sz + 128); |
166 | p = buf + sz; | 166 | p = buf + sz; |
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c index 97e9949e9..7a0f75d6f 100644 --- a/libbb/u_signal_names.c +++ b/libbb/u_signal_names.c | |||
@@ -130,7 +130,7 @@ int get_signum(const char *name) | |||
130 | return i; | 130 | return i; |
131 | if (strncasecmp(name, "SIG", 3) == 0) | 131 | if (strncasecmp(name, "SIG", 3) == 0) |
132 | name += 3; | 132 | name += 3; |
133 | for (i = 0; i < ARRAY_SIZE(signals); i++) | 133 | for (i = 0; (size_t)i < ARRAY_SIZE(signals); i++) |
134 | if (strcasecmp(name, signals[i]) == 0) | 134 | if (strcasecmp(name, signals[i]) == 0) |
135 | return i; | 135 | return i; |
136 | 136 | ||
@@ -172,7 +172,7 @@ void print_signames(void) | |||
172 | { | 172 | { |
173 | int signo; | 173 | int signo; |
174 | 174 | ||
175 | for (signo = 1; signo < ARRAY_SIZE(signals); signo++) { | 175 | for (signo = 1; (size_t)signo < ARRAY_SIZE(signals); signo++) { |
176 | const char *name = signals[signo]; | 176 | const char *name = signals[signo]; |
177 | if (name[0]) | 177 | if (name[0]) |
178 | puts(name); | 178 | puts(name); |
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index d3fb39f04..105939b5e 100644 --- a/libbb/xfuncs_printf.c +++ b/libbb/xfuncs_printf.c | |||
@@ -204,7 +204,7 @@ void xwrite(int fd, const void *buf, size_t count) | |||
204 | { | 204 | { |
205 | if (count) { | 205 | if (count) { |
206 | ssize_t size = full_write(fd, buf, count); | 206 | ssize_t size = full_write(fd, buf, count); |
207 | if (size != count) | 207 | if ((size_t)size != count) |
208 | bb_error_msg_and_die("short write"); | 208 | bb_error_msg_and_die("short write"); |
209 | } | 209 | } |
210 | } | 210 | } |