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

Re: [MiNT] How serious is GCC "cast increases requiered alignment of target type" warning?



Ole Loots wrote:
static inline uint32_t *
get_xy_loc(nsfb_t *nsfb, int x, int y)
{
        return (uint32_t *)(nsfb->ptr + (y * nsfb->linelen) + (x << 2));
}

the line with "return ( ..." throws the warning.

There are a lot of unknown information...
The definition of types nsfb_t, uint32_t and nsfb->ptr are missing in your snippet.
Also the fact get_xy_loc() is static inline may change the things...

We would need to have the full source code to understand what happens.
I think this warning is probably harmless and could be ignored until better understanding.

--
Vincent Rivière