From e3066634559e6e2b5a3a337be5b61c78dcae925c Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Sun, 14 Feb 2010 18:39:47 +0000 Subject: [PATCH] fix the somehow newly introduced warnings --- drivers/filter/md5.c | 2 +- drivers/filter/optset.c | 1 + kernel/arch/i386/exception.c | 40 ++++++++++++++++++------------------ 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/drivers/filter/md5.c b/drivers/filter/md5.c index a2a4b2961..f2962242a 100644 --- a/drivers/filter/md5.c +++ b/drivers/filter/md5.c @@ -188,7 +188,7 @@ MD5Final (digest, ctx) * reflect the addition of 16 longwords of new data. MD5Update blocks * the data and converts bytes into longwords for this routine. */ -static void +void MD5Transform (buf, inraw) uint32 buf[4]; const unsigned char inraw[64]; diff --git a/drivers/filter/optset.c b/drivers/filter/optset.c index f54a5ea1c..a338a4717 100644 --- a/drivers/filter/optset.c +++ b/drivers/filter/optset.c @@ -12,6 +12,7 @@ * May 2009 (D.C. van Moolenbroek) */ +#define _MINIX 1 #include #include #include diff --git a/kernel/arch/i386/exception.c b/kernel/arch/i386/exception.c index 0f5475458..0177a2c90 100644 --- a/kernel/arch/i386/exception.c +++ b/kernel/arch/i386/exception.c @@ -147,26 +147,26 @@ PUBLIC void exception_handler(int is_nested, struct exception_frame * frame) * them out quickly if the traps are not nested */ if (is_nested) { - /* - * if a problem occured while copying a message from userspace because - * of a wrong pointer supplied by userland, handle it the only way we - * can handle it ... - */ - if (((void*)frame->eip >= copy_msg_to_user && - (void*)frame->eip <= __copy_msg_to_user_end) || - ((void*)frame->eip >= copy_msg_from_user && - (void*)frame->eip <= __copy_msg_from_user_end)) { - switch(frame->vector) { - /* these error are expected */ - case PAGE_FAULT_VECTOR: - case PROTECTION_VECTOR: - frame->eip = (reg_t) __user_copy_msg_pointer_failure; - return; - default: - minix_panic("Copy involving a user pointer " - "failed unexpectedly!", NO_NUM); - } - } + /* + * if a problem occured while copying a message from userspace because + * of a wrong pointer supplied by userland, handle it the only way we + * can handle it ... + */ + if (((void*)frame->eip >= (void*)copy_msg_to_user && + (void*)frame->eip <= (void*)__copy_msg_to_user_end) || + ((void*)frame->eip >= (void*)copy_msg_from_user && + (void*)frame->eip <= (void*)__copy_msg_from_user_end)) { + switch(frame->vector) { + /* these error are expected */ + case PAGE_FAULT_VECTOR: + case PROTECTION_VECTOR: + frame->eip = (reg_t) __user_copy_msg_pointer_failure; + return; + default: + minix_panic("Copy involving a user pointer " + "failed unexpectedly!", NO_NUM); + } + } } if(frame->vector == PAGE_FAULT_VECTOR) {