Commit 2893b119 authored by Michael Natterer's avatar Michael Natterer 😴

Bug 695980 - Dereferencing type-punned pointer compile warning

Use local variables to avoid type-punned pointer warning.
parent 061764f8
......@@ -863,7 +863,12 @@ sample_bi (TileManager *tm,
* out of bounds.
*/
for (i = 0; i < 4; i++)
*(guint*) (&C[i]) = *(guint*) (bg_color);
{
guint *src = (guint *) bg_color;
guint *dst = (guint *) &C[i];
*dst = *src;
}
tile_manager_read_pixel_data_1 (tm, x0, y0, C[0]);
tile_manager_read_pixel_data_1 (tm, x1, y0, C[2]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment