The answer seems obvious, but considering this MISRA rule
Rule 11.5 A conversion should not be performed from pointer to void into pointer to object
would it not be safer to have memory allocation functions like "malloc" return a pointer to a char* instead? This type of pointer has no alignment issues.
Thanks.