From 5599502a550a7f892d4b73dceb2105a6916f83e6 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 18 May 2008 22:28:26 +0000 Subject: more -Wall warning fixes. -Wall is enabled now. --- libbb/appletlib.c | 4 ++-- libbb/lineedit.c | 4 ++-- libbb/xfuncs.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'libbb') diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 3d5aef873..464280b17 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -73,7 +73,7 @@ static const char *unpack_usage_messages(void) i = start_bunzip(&bd, /* src_fd: */ -1, - /* inbuf: */ packed_usage, + /* inbuf: */ (void *)packed_usage, /* len: */ sizeof(packed_usage)); /* read_bunzip can longjmp to start_bunzip, and ultimately * end up here with i != 0 on read data errors! Not trivial */ @@ -628,7 +628,7 @@ static int busybox_main(char **argv) if (!argv[1]) { /* Called without arguments */ const char *a; - int col, output_width; + unsigned col, output_width; help: output_width = 80; if (ENABLE_FEATURE_AUTOWIDTH) { diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 9c802a35f..c91efd40c 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1318,7 +1318,7 @@ static void cmdedit_setwidth(unsigned w, int redraw_flg) static void win_changed(int nsig) { - int width; + unsigned width; get_terminal_width_height(0, &width, NULL); cmdedit_setwidth(width, nsig /* - just a yes/no flag */); if (nsig == SIGWINCH) @@ -1353,7 +1353,7 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t #if ENABLE_FEATURE_TAB_COMPLETION smallint lastWasTab = FALSE; #endif - unsigned int ic; + unsigned ic; unsigned char c; smallint break_out = 0; #if ENABLE_FEATURE_EDITING_VI diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 915b74dd1..fe3c647d0 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -262,7 +262,7 @@ off_t fdlength(int fd) /* It is perfectly ok to pass in a NULL for either width or for * height, in which case that value will not be set. */ -int get_terminal_width_height(int fd, int *width, int *height) +int get_terminal_width_height(int fd, unsigned *width, unsigned *height) { struct winsize win = { 0, 0, 0, 0 }; int ret = ioctl(fd, TIOCGWINSZ, &win); -- cgit v1.2.3