[collectd] [PATCH] libiptc: avoid strict-aliasing warnings

Florian Forster octo at verplant.org
Tue Mar 9 17:09:22 CET 2010


Hi Alan, hi Jan,

On Tue, Feb 16, 2010 at 09:16:47PM +0100, Alan Pevec wrote:
> -		int pos = *(int *)t->data;
> +		const unsigned char *data = t->data;
> +		int pos = *(const int *)data;

I have to admit these changes look a bit like "cast to different types
until the compiler is confused", but I don't see any problem arising
from those casts either. So if it's fixing a problem for you, it's fine
by me. I've applied the changes to the collectd-4.8 branch.

I assume that's GCC throwing those warnings? Just out of curiosity, what
version is that?

Regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100309/290d70e0/attachment.pgp 


More information about the collectd mailing list