linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: linux-sparse@vger.kernel.org
Subject: sparse preprocessing confused
Date: Wed, 25 Apr 2007 16:43:55 -0700	[thread overview]
Message-ID: <20070425164355.2c250388.rdunlap@xenotime.net> (raw)

Although this may just be a case of "it's fugly, kill it".

In net/core/skbuff.c (2.6.21-rc7-mm1), we have:

	memcpy(data + nhead, skb->head,
#ifdef NET_SKBUFF_DATA_USES_OFFSET
		skb->tail);
#else
		skb->tail - skb->head);
#endif

and sparse says:

net/core/skbuff.c:651:2: error: unmatched #else within stream
net/core/skbuff.c:653:2: error: unmatched #endif in stream
net/core/skbuff.c:648:2: error: Expected ) in expression
net/core/skbuff.c:648:2: error: got #
net/core/skbuff.c:648:2: error: Expected ) in function call
net/core/skbuff.c:648:2: error: got #
net/core/skbuff.c:648:2: error: Expected ; at end of statement
net/core/skbuff.c:648:2: error: got __ret
net/core/skbuff.c:652:24: error: Expected ; at end of statement
net/core/skbuff.c:652:24: error: got )
net/core/skbuff.c:648:2: error: undefined identifier 'else'
net/core/skbuff.c:652:13: error: incompatible types for operation (-)
net/core/skbuff.c:652:13:    left side has type unsigned int [unsigned] [usertype] tail
net/core/skbuff.c:652:13:    right side has type unsigned char *head

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

             reply	other threads:[~2007-04-25 23:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25 23:43 Randy Dunlap [this message]
2007-04-25 23:52 ` sparse preprocessing confused Morten Welinder
2007-04-26 14:38   ` Neil Booth
2007-04-29  5:41     ` Chris Wedgwood
2007-04-29  6:36       ` Josh Triplett

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=20070425164355.2c250388.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=linux-sparse@vger.kernel.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 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).