diff -Naur linux-0.01-rm-2.0/fs/bitmap.c linux-0.01-rm-2.1/fs/bitmap.c --- linux-0.01-rm-2.0/fs/bitmap.c 2007-11-26 20:56:34.000000000 +0100 +++ linux-0.01-rm-2.1/fs/bitmap.c 2007-11-30 23:37:55.000000000 +0100 @@ -74,7 +74,7 @@ panic("trying to get new block from nonexistant device"); j = 8192; for (i=0 ; i<8 ; i++) - if (bh=sb->s_zmap[i]) + if ((bh=sb->s_zmap[i])) if ((j=find_first_zero(bh->b_data))<8192) break; if (i>=8 || !bh || j>=8192) @@ -138,7 +138,7 @@ panic("new_inode with unknown device"); j = 8192; for (i=0 ; i<8 ; i++) - if (bh=sb->s_imap[i]) + if ((bh=sb->s_imap[i])) if ((j=find_first_zero(bh->b_data))<8192) break; if (!bh || j >= 8192 || j+i*8192 > sb->s_ninodes) { diff -Naur linux-0.01-rm-2.0/fs/block_dev.c linux-0.01-rm-2.1/fs/block_dev.c --- linux-0.01-rm-2.0/fs/block_dev.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/fs/block_dev.c 2007-11-30 23:26:29.000000000 +0100 @@ -77,7 +77,7 @@ void ll_rw_block(int rw, struct buffer_head * bh) { - blk_fn blk_addr; + blk_fn blk_addr=NULL; unsigned int major; if ((major=MAJOR(bh->b_dev)) >= NR_BLK_DEV || !(blk_addr=rd_blk[major])) diff -Naur linux-0.01-rm-2.0/fs/buffer.c linux-0.01-rm-2.1/fs/buffer.c --- linux-0.01-rm-2.0/fs/buffer.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/fs/buffer.c 2007-11-30 23:24:40.000000000 +0100 @@ -146,7 +146,7 @@ struct buffer_head * tmp; repeat: - if (tmp=get_hash_table(dev,block)) + if ((tmp=get_hash_table(dev,block))) return tmp; tmp = free_list; do { diff -Naur linux-0.01-rm-2.0/fs/char_dev.c linux-0.01-rm-2.1/fs/char_dev.c --- linux-0.01-rm-2.0/fs/char_dev.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/fs/char_dev.c 2007-11-30 23:40:54.000000000 +0100 @@ -9,7 +9,7 @@ static int rw_ttyx(int rw,unsigned minor,char * buf,int count); static int rw_tty(int rw,unsigned minor,char * buf,int count); -typedef (*crw_ptr)(int rw,unsigned minor,char * buf,int count); +typedef int (*crw_ptr)(int rw,unsigned minor,char * buf,int count); #define NRDEVS ((sizeof (crw_table))/(sizeof (crw_ptr))) diff -Naur linux-0.01-rm-2.0/fs/exec.c linux-0.01-rm-2.1/fs/exec.c --- linux-0.01-rm-2.0/fs/exec.c 2007-12-25 10:13:01.000000000 +0100 +++ linux-0.01-rm-2.1/fs/exec.c 2007-12-25 10:13:48.000000000 +0100 @@ -70,7 +70,7 @@ return -1; table = (unsigned short *) ih->b_data; while (size>0) { - if (block=*(table++)) + if ((block=*(table++))) { if (!(bh=bread(dev,block))) { brelse(ih); return -1; @@ -78,6 +78,7 @@ cp_block(bh->b_data,offset); brelse(bh); } + } size -= BLOCK_SIZE; offset += BLOCK_SIZE; } @@ -110,6 +111,7 @@ BLOCK_SIZE*(518+count))) || (size -= BLOCK_SIZE*512)<=0) return i; panic("Impossibly long executable"); + return -1; } /* @@ -151,7 +153,7 @@ int i=0; char ** tmp; - if (tmp = argv) + if ((tmp = argv)) while (get_fs_long((unsigned long *) (tmp++))) i++; diff -Naur linux-0.01-rm-2.0/fs/file_dev.c linux-0.01-rm-2.1/fs/file_dev.c --- linux-0.01-rm-2.0/fs/file_dev.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/fs/file_dev.c 2007-11-30 23:41:30.000000000 +0100 @@ -16,7 +16,7 @@ if ((left=count)<=0) return 0; while (left) { - if (nr = bmap(inode,(filp->f_pos)/BLOCK_SIZE)) { + if ((nr = bmap(inode,(filp->f_pos)/BLOCK_SIZE))) { if (!(bh=bread(inode->i_dev,nr))) break; } else diff -Naur linux-0.01-rm-2.0/fs/inode.c linux-0.01-rm-2.1/fs/inode.c --- linux-0.01-rm-2.0/fs/inode.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/fs/inode.c 2007-11-30 23:24:04.000000000 +0100 @@ -57,7 +57,7 @@ panic("_bmap: block>big"); if (block<7) { if (create && !inode->i_zone[block]) - if (inode->i_zone[block]=new_block(inode->i_dev)) { + if ((inode->i_zone[block]=new_block(inode->i_dev))) { inode->i_ctime=CURRENT_TIME; inode->i_dirt=1; } @@ -66,7 +66,7 @@ block -= 7; if (block<512) { if (create && !inode->i_zone[7]) - if (inode->i_zone[7]=new_block(inode->i_dev)) { + if ((inode->i_zone[7]=new_block(inode->i_dev))) { inode->i_dirt=1; inode->i_ctime=CURRENT_TIME; } @@ -76,7 +76,7 @@ return 0; i = ((unsigned short *) (bh->b_data))[block]; if (create && !i) - if (i=new_block(inode->i_dev)) { + if ((i=new_block(inode->i_dev))) { ((unsigned short *) (bh->b_data))[block]=i; bh->b_dirt=1; } @@ -85,7 +85,7 @@ } block -= 512; if (create && !inode->i_zone[8]) - if (inode->i_zone[8]=new_block(inode->i_dev)) { + if ((inode->i_zone[8]=new_block(inode->i_dev))) { inode->i_dirt=1; inode->i_ctime=CURRENT_TIME; } @@ -95,7 +95,7 @@ return 0; i = ((unsigned short *)bh->b_data)[block>>9]; if (create && !i) - if (i=new_block(inode->i_dev)) { + if ((i=new_block(inode->i_dev))) { ((unsigned short *) (bh->b_data))[block>>9]=i; bh->b_dirt=1; } @@ -106,7 +106,7 @@ return 0; i = ((unsigned short *)bh->b_data)[block&511]; if (create && !i) - if (i=new_block(inode->i_dev)) { + if ((i=new_block(inode->i_dev))) { ((unsigned short *) (bh->b_data))[block&511]=i; bh->b_dirt=1; } diff -Naur linux-0.01-rm-2.0/fs/namei.c linux-0.01-rm-2.1/fs/namei.c --- linux-0.01-rm-2.0/fs/namei.c 2007-11-27 21:13:03.000000000 +0100 +++ linux-0.01-rm-2.1/fs/namei.c 2007-11-30 23:38:16.000000000 +0100 @@ -255,7 +255,7 @@ if (!(dir = get_dir(pathname))) return NULL; basename = pathname; - while (c=get_fs_byte(pathname++)) + while ((c=get_fs_byte(pathname++))) if (c=='/') basename=pathname; *namelen = pathname-basename-1; diff -Naur linux-0.01-rm-2.0/fs/open.c linux-0.01-rm-2.1/fs/open.c --- linux-0.01-rm-2.0/fs/open.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/fs/open.c 2007-11-30 23:22:49.000000000 +0100 @@ -39,11 +39,12 @@ return -EACCES; res = inode->i_mode & 0777; iput(inode); - if (!(current->euid && current->uid)) + if (!(current->euid && current->uid)) { if (res & 0111) res = 0777; else res = 0666; + } if (current->euid == inode->i_uid) res >>= 6; else if (current->egid == inode->i_gid) @@ -89,12 +90,13 @@ if (!(inode=namei(filename))) return -ENOENT; - if (current->uid && current->euid) + if (current->uid && current->euid) { if (current->uid!=inode->i_uid && current->euid!=inode->i_uid) { iput(inode); return -EACCES; } else mode = (mode & 0777) | (inode->i_mode & 07000); + } inode->i_mode = (mode & 07777) | (inode->i_mode & ~07777); inode->i_dirt = 1; iput(inode); @@ -143,7 +145,7 @@ return i; } /* ttys are somewhat special (ttyxx major==4, tty major==5) */ - if (S_ISCHR(inode->i_mode)) + if (S_ISCHR(inode->i_mode)) { if (MAJOR(inode->i_zone[0])==4) { if (current->leader && current->tty<0) { current->tty = MINOR(inode->i_zone[0]); @@ -156,6 +158,7 @@ f->f_count=0; return -EPERM; } + } f->f_mode = inode->i_mode; f->f_flags = flag; f->f_count = 1; diff -Naur linux-0.01-rm-2.0/fs/super.c linux-0.01-rm-2.1/fs/super.c --- linux-0.01-rm-2.0/fs/super.c 2007-11-26 20:50:42.000000000 +0100 +++ linux-0.01-rm-2.1/fs/super.c 2007-11-30 23:25:08.000000000 +0100 @@ -39,12 +39,12 @@ p->s_zmap[i] = NULL; block=2; for (i=0 ; i < p->s_imap_blocks ; i++) - if (p->s_imap[i]=bread(dev,block)) + if ((p->s_imap[i]=bread(dev,block))) block++; else break; for (i=0 ; i < p->s_zmap_blocks ; i++) - if (p->s_zmap[i]=bread(dev,block)) + if ((p->s_zmap[i]=bread(dev,block))) block++; else break; diff -Naur linux-0.01-rm-2.0/fs/truncate.c linux-0.01-rm-2.1/fs/truncate.c --- linux-0.01-rm-2.0/fs/truncate.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/fs/truncate.c 2007-11-30 22:46:23.000000000 +0100 @@ -10,7 +10,7 @@ if (!block) return; - if (bh=bread(dev,block)) { + if ((bh=bread(dev,block))) { p = (unsigned short *) bh->b_data; for (i=0;i<512;i++,p++) if (*p) @@ -28,7 +28,7 @@ if (!block) return; - if (bh=bread(dev,block)) { + if ((bh=bread(dev,block))) { p = (unsigned short *) bh->b_data; for (i=0;i<512;i++,p++) if (*p) diff -Naur linux-0.01-rm-2.0/include/ctype.h linux-0.01-rm-2.1/include/ctype.h --- linux-0.01-rm-2.0/include/ctype.h 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/include/ctype.h 2007-11-30 23:18:57.000000000 +0100 @@ -11,7 +11,7 @@ #define _SP 0x80 /* hard space (0x20) */ extern unsigned char _ctype[]; -extern char _ctmp; +extern signed char _ctmp; #define isalnum(c) ((_ctype+1)[c]&(_U|_L|_D)) #define isalpha(c) ((_ctype+1)[c]&(_U|_L)) diff -Naur linux-0.01-rm-2.0/init/main.c linux-0.01-rm-2.1/init/main.c --- linux-0.01-rm-2.0/init/main.c 2007-12-23 18:20:44.000000000 +0100 +++ linux-0.01-rm-2.1/init/main.c 2007-12-07 14:27:36.000000000 +0100 @@ -76,7 +76,7 @@ startup_time = kernel_mktime(&time); } -void main(void) /* This really IS void, no error here. */ +int main(void) /* This really IS void, no error here. */ { /* The startup routine assumes (well, ...) this */ /* * Interrupts are still disabled. Do necessary setups, then @@ -101,6 +101,8 @@ * task can run, and if not we return here. */ for(;;) pause(); + + return 0; } static int printf(const char *fmt, ...) diff -Naur linux-0.01-rm-2.0/kernel/fork.c linux-0.01-rm-2.1/kernel/fork.c --- linux-0.01-rm-2.0/kernel/fork.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/kernel/fork.c 2007-11-30 22:49:56.000000000 +0100 @@ -109,7 +109,7 @@ return -EAGAIN; } for (i=0; ifilp[i]) + if ((f=p->filp[i])) f->f_count++; if (current->pwd) current->pwd->i_count++; diff -Naur linux-0.01-rm-2.0/kernel/hd.c linux-0.01-rm-2.1/kernel/hd.c --- linux-0.01-rm-2.0/kernel/hd.c 2007-12-23 18:52:56.000000000 +0100 +++ linux-0.01-rm-2.1/kernel/hd.c 2007-11-30 23:13:11.000000000 +0100 @@ -50,9 +50,9 @@ } request[NR_REQUEST]; #define IN_ORDER(s1,s2) \ -((s1)->hd<(s2)->hd || (s1)->hd==(s2)->hd && \ -((s1)->cyl<(s2)->cyl || (s1)->cyl==(s2)->cyl && \ -((s1)->head<(s2)->head || (s1)->head==(s2)->head && \ +(((s1)->hd<(s2)->hd || (s1)->hd==(s2)->hd) && \ +(((s1)->cyl<(s2)->cyl || (s1)->cyl==(s2)->cyl) && \ +(((s1)->head<(s2)->head || (s1)->head==(s2)->head) && \ ((s1)->sector<(s2)->sector)))) static struct hd_request * this_request = NULL; @@ -205,7 +205,7 @@ break; i = inb(HD_STATUS); i &= BUSY_STAT | READY_STAT | SEEK_STAT; - if (i == READY_STAT | SEEK_STAT) + if (i == (READY_STAT | SEEK_STAT)) return(0); printk("HD controller times out\n\r"); return(1); diff -Naur linux-0.01-rm-2.0/kernel/printk.c linux-0.01-rm-2.1/kernel/printk.c --- linux-0.01-rm-2.0/kernel/printk.c 2007-11-26 21:48:24.000000000 +0100 +++ linux-0.01-rm-2.1/kernel/printk.c 2007-11-30 22:49:21.000000000 +0100 @@ -8,6 +8,7 @@ #include +extern int vsprintf(); static char buf[1024]; int printk(const char *fmt, ...) diff -Naur linux-0.01-rm-2.0/kernel/tty_io.c linux-0.01-rm-2.1/kernel/tty_io.c --- linux-0.01-rm-2.0/kernel/tty_io.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/kernel/tty_io.c 2007-11-30 23:09:30.000000000 +0100 @@ -206,7 +206,7 @@ minimum = (unsigned) tty->termios.c_cc[VMIN]; if (time && !minimum) { minimum=1; - if (flag=(!oldalarm || time+jiffiesalarm = time+jiffies; } if (minimum>nr) @@ -235,11 +235,12 @@ break; } } while (nr>0 && !EMPTY(tty->secondary)); - if (time && !L_CANON(tty)) - if (flag=(!oldalarm || time+jiffiesalarm = time+jiffies; else current->alarm = oldalarm; + } if (L_CANON(tty)) { if (b-buf) break; @@ -254,7 +255,7 @@ int tty_write(unsigned channel, char * buf, int nr) { - static cr_flag=0; + static int cr_flag=0; struct tty_struct * tty; char c, *b=buf; diff -Naur linux-0.01-rm-2.0/kernel/vsprintf.c linux-0.01-rm-2.1/kernel/vsprintf.c --- linux-0.01-rm-2.0/kernel/vsprintf.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/kernel/vsprintf.c 2007-11-30 23:03:30.000000000 +0100 @@ -49,9 +49,10 @@ } else sign=(type&PLUS) ? '+' : ((type&SPACE) ? ' ' : 0); if (sign) size--; - if (type&SPECIAL) + if (type&SPECIAL){ if (base==16) size -= 2; else if (base==8) size--; + } i=0; if (num==0) tmp[i++]='0'; @@ -64,13 +65,14 @@ *str++ = ' '; if (sign) *str++ = sign; - if (type&SPECIAL) + if (type&SPECIAL) { if (base==8) *str++ = '0'; else if (base==16) { *str++ = '0'; *str++ = digits[33]; } + } if (!(type&LEFT)) while(size-->0) *str++ = c; diff -Naur linux-0.01-rm-2.0/lib/ctype.c linux-0.01-rm-2.1/lib/ctype.c --- linux-0.01-rm-2.0/lib/ctype.c 2007-11-25 22:07:55.000000000 +0100 +++ linux-0.01-rm-2.1/lib/ctype.c 2007-11-30 23:19:29.000000000 +0100 @@ -1,6 +1,6 @@ #include -char _ctmp; +signed char _ctmp; unsigned char _ctype[] = {0x00, /* EOF */ _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ _C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */ diff -Naur linux-0.01-rm-2.0/mm/memory.c linux-0.01-rm-2.1/mm/memory.c --- linux-0.01-rm-2.0/mm/memory.c 2007-11-26 20:38:54.000000000 +0100 +++ linux-0.01-rm-2.1/mm/memory.c 2007-11-30 23:21:27.000000000 +0100 @@ -238,7 +238,7 @@ { unsigned long tmp; - if (tmp=get_free_page()) + if ((tmp=get_free_page())) if (put_page(tmp,address)) return; do_exit(SIGSEGV);