diff options
author | Jeff Dike <jdike@addtoit.com> | 2005-06-08 18:48:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-08 19:21:12 -0400 |
commit | da00d9a5466558ccd9e7b7d04b13d7cb9160c876 (patch) | |
tree | 4edc27caa63126e902da3752f58adb8ee792762c /arch/um/drivers | |
parent | 3df59529ad1045da61698bb5dd8ebaa547aeb46f (diff) |
[PATCH] uml: compile fixes for gcc 4
This is a bunch of compile fixes provoked by building UML with gcc 4. There
are a bunch of signedness mismatches, a couple of uninitialized references,
and a botched C99 structure initialization which had somehow gone unnoticed.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/chan_user.c | 4 | ||||
-rw-r--r-- | arch/um/drivers/net_user.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/slip.h | 4 | ||||
-rw-r--r-- | arch/um/drivers/slip_proto.h | 3 | ||||
-rw-r--r-- | arch/um/drivers/slirp.h | 4 | ||||
-rw-r--r-- | arch/um/drivers/stderr_console.c | 6 |
6 files changed, 12 insertions, 11 deletions
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index 583b8e137c33..96f3a477c95e 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c | |||
@@ -168,7 +168,7 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out) | |||
168 | printk("winch_tramp : failed to read synchronization byte\n"); | 168 | printk("winch_tramp : failed to read synchronization byte\n"); |
169 | printk("read failed, err = %d\n", -n); | 169 | printk("read failed, err = %d\n", -n); |
170 | printk("fd %d will not support SIGWINCH\n", fd); | 170 | printk("fd %d will not support SIGWINCH\n", fd); |
171 | *fd_out = -1; | 171 | pid = -1; |
172 | } | 172 | } |
173 | return(pid); | 173 | return(pid); |
174 | } | 174 | } |
@@ -186,7 +186,7 @@ void register_winch(int fd, struct tty_struct *tty) | |||
186 | if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, | 186 | if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, |
187 | tty) && (pid == -1)){ | 187 | tty) && (pid == -1)){ |
188 | thread = winch_tramp(fd, tty, &thread_fd); | 188 | thread = winch_tramp(fd, tty, &thread_fd); |
189 | if(fd != -1){ | 189 | if(thread > 0){ |
190 | register_winch_irq(thread_fd, fd, thread, tty); | 190 | register_winch_irq(thread_fd, fd, thread, tty); |
191 | 191 | ||
192 | count = os_write_file(thread_fd, &c, sizeof(c)); | 192 | count = os_write_file(thread_fd, &c, sizeof(c)); |
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 47229fe4a813..3730d4f12713 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c | |||
@@ -32,7 +32,7 @@ int tap_open_common(void *dev, char *gate_addr) | |||
32 | return(0); | 32 | return(0); |
33 | } | 33 | } |
34 | 34 | ||
35 | void tap_check_ips(char *gate_addr, char *eth_addr) | 35 | void tap_check_ips(char *gate_addr, unsigned char *eth_addr) |
36 | { | 36 | { |
37 | int tap_addr[4]; | 37 | int tap_addr[4]; |
38 | 38 | ||
diff --git a/arch/um/drivers/slip.h b/arch/um/drivers/slip.h index 495f2f1b1420..d523618cd5ac 100644 --- a/arch/um/drivers/slip.h +++ b/arch/um/drivers/slip.h | |||
@@ -12,8 +12,8 @@ struct slip_data { | |||
12 | char *addr; | 12 | char *addr; |
13 | char *gate_addr; | 13 | char *gate_addr; |
14 | int slave; | 14 | int slave; |
15 | char ibuf[ENC_BUF_SIZE]; | 15 | unsigned char ibuf[ENC_BUF_SIZE]; |
16 | char obuf[ENC_BUF_SIZE]; | 16 | unsigned char obuf[ENC_BUF_SIZE]; |
17 | int more; /* more data: do not read fd until ibuf has been drained */ | 17 | int more; /* more data: do not read fd until ibuf has been drained */ |
18 | int pos; | 18 | int pos; |
19 | int esc; | 19 | int esc; |
diff --git a/arch/um/drivers/slip_proto.h b/arch/um/drivers/slip_proto.h index 7206361ace45..4c4d94a33100 100644 --- a/arch/um/drivers/slip_proto.h +++ b/arch/um/drivers/slip_proto.h | |||
@@ -12,7 +12,8 @@ | |||
12 | #define SLIP_ESC_END 0334 /* ESC ESC_END means END 'data' */ | 12 | #define SLIP_ESC_END 0334 /* ESC ESC_END means END 'data' */ |
13 | #define SLIP_ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */ | 13 | #define SLIP_ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */ |
14 | 14 | ||
15 | static inline int slip_unesc(unsigned char c,char *buf,int *pos, int *esc) | 15 | static inline int slip_unesc(unsigned char c, unsigned char *buf, int *pos, |
16 | int *esc) | ||
16 | { | 17 | { |
17 | int ret; | 18 | int ret; |
18 | 19 | ||
diff --git a/arch/um/drivers/slirp.h b/arch/um/drivers/slirp.h index 04e407d1e44a..afa4e30284fd 100644 --- a/arch/um/drivers/slirp.h +++ b/arch/um/drivers/slirp.h | |||
@@ -24,8 +24,8 @@ struct slirp_data { | |||
24 | struct arg_list_dummy_wrapper argw; | 24 | struct arg_list_dummy_wrapper argw; |
25 | int pid; | 25 | int pid; |
26 | int slave; | 26 | int slave; |
27 | char ibuf[ENC_BUF_SIZE]; | 27 | unsigned char ibuf[ENC_BUF_SIZE]; |
28 | char obuf[ENC_BUF_SIZE]; | 28 | unsigned char obuf[ENC_BUF_SIZE]; |
29 | int more; /* more data: do not read fd until ibuf has been drained */ | 29 | int more; /* more data: do not read fd until ibuf has been drained */ |
30 | int pos; | 30 | int pos; |
31 | int esc; | 31 | int esc; |
diff --git a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c index 98565b53d170..429ae8e6c7e5 100644 --- a/arch/um/drivers/stderr_console.c +++ b/arch/um/drivers/stderr_console.c | |||
@@ -22,9 +22,9 @@ static void stderr_console_write(struct console *console, const char *string, | |||
22 | } | 22 | } |
23 | 23 | ||
24 | static struct console stderr_console = { | 24 | static struct console stderr_console = { |
25 | .name "stderr", | 25 | .name = "stderr", |
26 | .write stderr_console_write, | 26 | .write = stderr_console_write, |
27 | .flags CON_PRINTBUFFER, | 27 | .flags = CON_PRINTBUFFER, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | static int __init stderr_console_init(void) | 30 | static int __init stderr_console_init(void) |