Re: type mismatch

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

 



I don't really have a strong opinion either way...  It's unlikely that
we will introduce a bug here and if we did, I think it would be caught
immediately in testing.

It's pretty common to treat the first member of a struct as special.
What annoys me is when people do

struct foo {
	int one, two, three;
	whatever;
};

memcpy(&foo.one, src, sizoef(struct foo));

Argh!?  These triger buffer overflows warnings in Smatch and I don't
see the point since &foo.one is less readable than &foo!  Oh well, I
think these were common enough, I had to treat it as idiomatic and add a
special case for them.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux