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.
MISRA or not - dynamic memory isn't a great idea in embedded devices with long uptimes. Too much problems with fragmented heap, resulting in failed memory allocations even if there are lots of free memory.
Thanks folks.