[PATCH] sparse function pointer arguments now accept void pointers
From: Dave Olien (dmo_at_osdl.org)
Date: 07/31/03
- Previous message: Aaron Lehmann: "IDE errors with HPT302"
- Next in thread: Bernd Eckenfels: "Re: [PATCH] sparse function pointer arguments now accept void pointers"
- Reply: Bernd Eckenfels: "Re: [PATCH] sparse function pointer arguments now accept void pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Jul 2003 22:28:10 -0700 To: torvalds@osdl.org
This patch eliminates warnings of the form:
incorrect type in argument 1 (different base types)
from code of the form:
#define VPTR ((void *)1)
void f( int (g)(void))
{
}
int
main(void)
{
f(VPTR);
f(0);
}
--- sparse_original/evaluate.c 2003-07-29 14:13:09.000000000 -0700
+++ sparse_patch/evaluate.c 2003-07-30 18:14:25.000000000 -0700
@@ -647,7 +653,7 @@
t = t->ctype.base_type;
target_as |= t->ctype.as;
}
- if (t->type == SYM_PTR) {
+ if (t->type == SYM_PTR || t->type == SYM_FN) {
struct expression *right = *rp;
struct symbol *s = source;
int source_as;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Aaron Lehmann: "IDE errors with HPT302"
- Next in thread: Bernd Eckenfels: "Re: [PATCH] sparse function pointer arguments now accept void pointers"
- Reply: Bernd Eckenfels: "Re: [PATCH] sparse function pointer arguments now accept void pointers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|