sparse preprocessing confused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ***
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux