Files
lm-sensors/lib
Mark M. Hoffman 71a96916d5 Patch by Philipp Thomas <pth@suse.de>:
> Current gcc versions warn when type punning is used, as this breaks the
> strict aliasing analysis gcc 3.3 does by default. When checking the causes
> for these warnings I discovered that sensors_malloc_array,
> sensors_free_array, sensors_add_array_el and sensors_add_array_els in
> lib/general.c all take a 'void **' for the list. This is plain wrong as
> the C standard only allow 'char *' and 'void *' to alias any other type, so
> if these functions should take a generic pointer, it *must* be a 'void *'
> that's internally cast to a 'void **'.
>
> The attached patch does this and adapts all places where these functions are
> called. Note that when done correctly, no cast what-so-ever in the calling
> code is needed.
>
> The patch is against current lm_sensors2 cvs version.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2345 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-03-08 04:39:50 +00:00
..
1999-02-08 22:50:29 +00:00
2004-03-07 07:30:27 +00:00
2004-02-28 16:57:34 +00:00
1999-02-08 22:50:29 +00:00
2003-11-23 21:20:57 +00:00
2003-11-23 21:20:57 +00:00
2004-03-07 16:43:49 +00:00
2004-03-08 04:39:50 +00:00
1999-02-08 22:50:29 +00:00