Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da00d9a5 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

[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: default avatarJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3df59529
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
		printk("winch_tramp : failed to read synchronization byte\n");
		printk("read failed, err = %d\n", -n);
		printk("fd %d will not support SIGWINCH\n", fd);
		*fd_out = -1;
                pid = -1;
	}
	return(pid);
}
@@ -186,7 +186,7 @@ void register_winch(int fd, struct tty_struct *tty)
	if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd,
			     tty) && (pid == -1)){
		thread = winch_tramp(fd, tty, &thread_fd);
		if(fd != -1){
		if(thread > 0){
			register_winch_irq(thread_fd, fd, thread, tty);

			count = os_write_file(thread_fd, &c, sizeof(c));
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ int tap_open_common(void *dev, char *gate_addr)
	return(0);
}

void tap_check_ips(char *gate_addr, char *eth_addr)
void tap_check_ips(char *gate_addr, unsigned char *eth_addr)
{
	int tap_addr[4];

+2 −2
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@ struct slip_data {
	char *addr;
	char *gate_addr;
	int slave;
	char ibuf[ENC_BUF_SIZE];
	char obuf[ENC_BUF_SIZE];
	unsigned char ibuf[ENC_BUF_SIZE];
	unsigned char obuf[ENC_BUF_SIZE];
	int more; /* more data: do not read fd until ibuf has been drained */
	int pos;
	int esc;
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@
#define SLIP_ESC_END         0334	/* ESC ESC_END means END 'data'	*/
#define SLIP_ESC_ESC         0335	/* ESC ESC_ESC means ESC 'data'	*/

static inline int slip_unesc(unsigned char c,char *buf,int *pos, int *esc)
static inline int slip_unesc(unsigned char c, unsigned char *buf, int *pos,
                             int *esc)
{
	int ret;

+2 −2
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ struct slirp_data {
	struct arg_list_dummy_wrapper argw;
	int pid;
	int slave;
	char ibuf[ENC_BUF_SIZE];
	char obuf[ENC_BUF_SIZE];
	unsigned char ibuf[ENC_BUF_SIZE];
	unsigned char obuf[ENC_BUF_SIZE];
	int more; /* more data: do not read fd until ibuf has been drained */
	int pos;
	int esc;
Loading