Re: including sparse headers in C++ code

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

 



On Tue, Oct 12, 2010 at 12:33:32AM +0200, Tomas Klacko wrote:

> Great. I am posting my current status (as a patch) so that you can comment on it
> and that I can refine it further.

ehh...  Use of capitalized variable names is a Bad Idea(tm).  Especially
since you are doing that well outside of headers, so even compatibility
with Straustrups's Mistake does not serve as a reason.

> -#define CHECK_TYPE(head,ptr)		(void)(&(ptr) == &(head)->list[0])
> +#define CHECK_TYPE(head,ptr)		(void)((void*)&(ptr) == (void*)&(head)->list[0])

WTF?  You do realize that it defeats the only purpose of this thing?
--
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