Index: kernel/arch/ia32/src/drivers/ega.c
===================================================================
--- kernel/arch/ia32/src/drivers/ega.c	(revision 67f5fbd92424ee3d6c31b93b0b515498a9a24b3e)
+++ kernel/arch/ia32/src/drivers/ega.c	(revision e8a0b90b4a2726b532a39fb80b80662f5bed01e9)
@@ -67,5 +67,5 @@
 };
 
-void ega_move_cursor(void);
+static void ega_move_cursor(void);
 
 void ega_init(void)
@@ -120,5 +120,5 @@
 }
 
-void ega_putchar(chardev_t *d, const char ch)
+void ega_putchar(chardev_t *d __attribute__((unused)), const char ch)
 {
 	ipl_t ipl;
@@ -153,7 +153,7 @@
 {
 	outb(0x3d4, 0xe);
-	outb(0x3d5, (ega_cursor >> 8) & 0xff);
+	outb(0x3d5, (uint8_t) ((ega_cursor >> 8) & 0xff));
 	outb(0x3d4, 0xf);
-	outb(0x3d5, ega_cursor & 0xff);	
+	outb(0x3d5, (uint8_t) (ega_cursor & 0xff));	
 }
 
Index: kernel/arch/ia32/src/drivers/i8254.c
===================================================================
--- kernel/arch/ia32/src/drivers/i8254.c	(revision 67f5fbd92424ee3d6c31b93b0b515498a9a24b3e)
+++ kernel/arch/ia32/src/drivers/i8254.c	(revision e8a0b90b4a2726b532a39fb80b80662f5bed01e9)
@@ -67,5 +67,5 @@
 }
 
-static void i8254_irq_handler(irq_t *irq, void *arg, ...)
+static void i8254_irq_handler(irq_t *irq, void *arg __attribute__((unused)), ...)
 {
 	/*
@@ -122,5 +122,5 @@
 		/* will read both status and count */
 		outb(CLK_PORT4, 0xc2);
-		not_ok = (inb(CLK_PORT1)>>6)&1;
+		not_ok = (uint8_t) ((inb(CLK_PORT1) >> 6) & 1);
 		t1 = inb(CLK_PORT1);
 		t1 |= inb(CLK_PORT1) << 8;
Index: kernel/arch/ia32/src/drivers/i8259.c
===================================================================
--- kernel/arch/ia32/src/drivers/i8259.c	(revision 67f5fbd92424ee3d6c31b93b0b515498a9a24b3e)
+++ kernel/arch/ia32/src/drivers/i8259.c	(revision e8a0b90b4a2726b532a39fb80b80662f5bed01e9)
@@ -96,9 +96,9 @@
 	if (irqmask & 0xff) {
 		x = inb(PIC_PIC0PORT2);
-		outb(PIC_PIC0PORT2, x & (~(irqmask & 0xff)));
+		outb(PIC_PIC0PORT2, (uint8_t) (x & (~(irqmask & 0xff))));
 	}
 	if (irqmask >> 8) {
 		x = inb(PIC_PIC1PORT2);
-		outb(PIC_PIC1PORT2, x & (~(irqmask >> 8)));
+		outb(PIC_PIC1PORT2, (uint8_t) (x & (~(irqmask >> 8))));
 	}
 }
@@ -110,9 +110,9 @@
 	if (irqmask & 0xff) {
 		x = inb(PIC_PIC0PORT2);
-		outb(PIC_PIC0PORT2, x | (irqmask & 0xff));
+		outb(PIC_PIC0PORT2, (uint8_t) (x | (irqmask & 0xff)));
 	}
 	if (irqmask >> 8) {
 		x = inb(PIC_PIC1PORT2);
-		outb(PIC_PIC1PORT2, x | (irqmask >> 8));
+		outb(PIC_PIC1PORT2, (uint8_t) (x | (irqmask >> 8)));
 	}
 }
@@ -124,8 +124,8 @@
 }
 
-void pic_spurious(int n, istate_t *istate)
+void pic_spurious(int n __attribute__((unused)), istate_t *istate __attribute__((unused)))
 {
 #ifdef CONFIG_DEBUG
-	printf("cpu%d: PIC spurious interrupt\n", CPU->id);
+	printf("cpu%u: PIC spurious interrupt\n", CPU->id);
 #endif
 }
Index: kernel/arch/ia32/src/ia32.c
===================================================================
--- kernel/arch/ia32/src/ia32.c	(revision 67f5fbd92424ee3d6c31b93b0b515498a9a24b3e)
+++ kernel/arch/ia32/src/ia32.c	(revision e8a0b90b4a2726b532a39fb80b80662f5bed01e9)
@@ -127,6 +127,8 @@
 void arch_post_smp_init(void)
 {
+	devno_t kbd = device_assign_devno();
+	devno_t mouse = device_assign_devno();
 	/* keyboard controller */
-	i8042_init(device_assign_devno(), IRQ_KBD, device_assign_devno(), IRQ_MOUSE);
+	i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE);
 }
 
Index: kernel/arch/ia32/src/interrupt.c
===================================================================
--- kernel/arch/ia32/src/interrupt.c	(revision 67f5fbd92424ee3d6c31b93b0b515498a9a24b3e)
+++ kernel/arch/ia32/src/interrupt.c	(revision e8a0b90b4a2726b532a39fb80b80662f5bed01e9)
@@ -70,17 +70,17 @@
 
 	if (CPU)
-		printf("----------------EXCEPTION OCCURED (cpu%d)----------------\n", CPU->id);
+		printf("----------------EXCEPTION OCCURED (cpu%u)----------------\n", CPU->id);
 	else
 		printf("----------------EXCEPTION OCCURED----------------\n");
 		
-	printf("%%eip: %#x (%s)\n",istate->eip,symbol);
-	printf("ERROR_WORD=%#x\n", istate->error_word);
-	printf("%%cs=%#x,flags=%#x\n", istate->cs, istate->eflags);
-	printf("%%eax=%#x, %%ecx=%#x, %%edx=%#x, %%esp=%#x\n",  istate->eax,istate->ecx,istate->edx,&istate->stack[0]);
+	printf("%%eip: %#lx (%s)\n", istate->eip, symbol);
+	printf("ERROR_WORD=%#lx\n", istate->error_word);
+	printf("%%cs=%#lx,flags=%#lx\n", istate->cs, istate->eflags);
+	printf("%%eax=%#lx, %%ecx=%#lx, %%edx=%#lx, %%esp=%p\n", istate->eax, istate->ecx, istate->edx, &istate->stack[0]);
 #ifdef CONFIG_DEBUG_ALLREGS
-	printf("%%esi=%#x, %%edi=%#x, %%ebp=%#x, %%ebx=%#x\n",  istate->esi,istate->edi,istate->ebp,istate->ebx);
-#endif
-	printf("stack: %#x, %#x, %#x, %#x\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]);
-	printf("       %#x, %#x, %#x, %#x\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]);
+	printf("%%esi=%#lx, %%edi=%#lx, %%ebp=%#lx, %%ebx=%#lx\n", istate->esi, istate->edi, istate->ebp, istate->ebx);
+#endif
+	printf("stack: %#lx, %#lx, %#lx, %#lx\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]);
+	printf("       %#lx, %#lx, %#lx, %#lx\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]);
 }
 
@@ -103,5 +103,5 @@
 
 /** General Protection Fault. */
-static void gp_fault(int n, istate_t *istate)
+static void gp_fault(int n __attribute__((unused)), istate_t *istate)
 {
 	if (TASK) {
@@ -130,5 +130,5 @@
 }
 
-static void ss_fault(int n, istate_t *istate)
+static void ss_fault(int n __attribute__((unused)), istate_t *istate)
 {
 	fault_if_from_uspace(istate, "stack fault");
@@ -138,20 +138,20 @@
 }
 
-static void simd_fp_exception(int n, istate_t *istate)
+static void simd_fp_exception(int n __attribute__((unused)), istate_t *istate)
 {
 	uint32_t mxcsr;
 	asm (
 		"stmxcsr %0;\n"
-		:"=m"(mxcsr)
+		: "=m" (mxcsr)
 	);
 	fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zx",
-	    (unative_t)mxcsr);
-
-	decode_istate(istate);
-	printf("MXCSR: %#zx\n",(unative_t)(mxcsr));
+	    (unative_t) mxcsr);
+
+	decode_istate(istate);
+	printf("MXCSR: %#lx\n", mxcsr);
 	panic("SIMD FP exception(19)\n");
 }
 
-static void nm_fault(int n, istate_t *istate)
+static void nm_fault(int n __attribute__((unused)), istate_t *istate __attribute__((unused)))
 {
 #ifdef CONFIG_FPU_LAZY     
@@ -164,5 +164,5 @@
 
 #ifdef CONFIG_SMP
-static void tlb_shootdown_ipi(int n, istate_t *istate)
+static void tlb_shootdown_ipi(int n __attribute__((unused)), istate_t *istate __attribute__((unused)))
 {
 	trap_virtual_eoi();
@@ -172,5 +172,5 @@
 
 /** Handler of IRQ exceptions */
-static void irq_interrupt(int n, istate_t *istate)
+static void irq_interrupt(int n, istate_t *istate __attribute__((unused)))
 {
 	ASSERT(n >= IVT_IRQBASE);
@@ -199,5 +199,5 @@
 		 */
 #ifdef CONFIG_DEBUG
-		printf("cpu%d: spurious interrupt (inum=%d)\n", CPU->id, inum);
+		printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, inum);
 #endif
 	}
Index: kernel/arch/ia32/src/mm/tlb.c
===================================================================
--- kernel/arch/ia32/src/mm/tlb.c	(revision 67f5fbd92424ee3d6c31b93b0b515498a9a24b3e)
+++ kernel/arch/ia32/src/mm/tlb.c	(revision e8a0b90b4a2726b532a39fb80b80662f5bed01e9)
@@ -49,5 +49,5 @@
  * @param asid This parameter is ignored as the architecture doesn't support it.
  */
-void tlb_invalidate_asid(asid_t asid)
+void tlb_invalidate_asid(asid_t asid __attribute__((unused)))
 {
 	tlb_invalidate_all();
@@ -60,5 +60,5 @@
  * @param cnt Number of entries to invalidate.
  */
-void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt)
+void tlb_invalidate_pages(asid_t asid __attribute__((unused)), uintptr_t page, count_t cnt)
 {
 	unsigned int i;
