All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Olien <dmo@osdl.org>
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] sparse function pointer arguments now accept void pointers
Date: Wed, 30 Jul 2003 22:28:10 -0700	[thread overview]
Message-ID: <20030731052810.GA2853@osdl.org> (raw)


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;

             reply	other threads:[~2003-07-31  5:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31  5:28 Dave Olien [this message]
2003-07-31  6:29 ` [PATCH] sparse function pointer arguments now accept void pointers Bernd Eckenfels
2003-07-31 16:45   ` Dave Olien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030731052810.GA2853@osdl.org \
    --to=dmo@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.