rtel wrote on Tuesday, March 10, 2015:
Interestingly I’ve never seen that warning. Projects created in Atmel Studio do, by default, have a very ‘elaborate’ set of warnings turned on individually. I normally just -Wall -Wextra.
It is a genuine warning non-the-less:
pxNewQueue = ( Queue_t * ) pcAllocatedBuffer;
pcAllocatedBuffer is a char*, with no alignment requirement. pxNewQueue is a Queue_t * with a 4 byte alignment requirement. Hence it is warning you that the alignment might not be correct after the assignment.
However, what the compiler does not know is that pcAllocatedBuffer is guaranteed to have 8-bit alignment as it was dynamically allocated. Therefore, it is a valid warning, but it is warning you about something that cannot possibly happen.