linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparse function pointer arguments now accept void pointers
@ 2003-07-31  5:28 Dave Olien
  2003-07-31  6:29 ` Bernd Eckenfels
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Olien @ 2003-07-31  5:28 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel


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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sparse function pointer arguments now accept void pointers
  2003-07-31  5:28 [PATCH] sparse function pointer arguments now accept void pointers Dave Olien
@ 2003-07-31  6:29 ` Bernd Eckenfels
  2003-07-31 16:45   ` Dave Olien
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Eckenfels @ 2003-07-31  6:29 UTC (permalink / raw)
  To: linux-kernel

In article <20030731052810.GA2853@osdl.org> you wrote:
> This patch eliminates warnings of the form:
...
> -       if (t->type == SYM_PTR) {
> +       if (t->type == SYM_PTR || t->type == SYM_FN) {

unlikely

Greetings
Bernd
-- 
eckes privat - http://www.eckes.org/
Project Freefire - http://www.freefire.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sparse function pointer arguments now accept void pointers
  2003-07-31  6:29 ` Bernd Eckenfels
@ 2003-07-31 16:45   ` Dave Olien
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Olien @ 2003-07-31 16:45 UTC (permalink / raw)
  To: Bernd Eckenfels; +Cc: linux-kernel


Bernd,

I might have messed up here.  But could you give a little more explanation,
to help me understand what you think is wrong with this and why?

Dave

On Thu, Jul 31, 2003 at 08:29:24AM +0200, Bernd Eckenfels wrote:
> In article <20030731052810.GA2853@osdl.org> you wrote:
> > This patch eliminates warnings of the form:
> ...
> > -       if (t->type == SYM_PTR) {
> > +       if (t->type == SYM_PTR || t->type == SYM_FN) {
> 
> unlikely
> 
> Greetings
> Bernd
> -- 
> eckes privat - http://www.eckes.org/
> Project Freefire - http://www.freefire.org/
> -
> 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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-31 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31  5:28 [PATCH] sparse function pointer arguments now accept void pointers Dave Olien
2003-07-31  6:29 ` Bernd Eckenfels
2003-07-31 16:45   ` Dave Olien

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).