The ColdFire compiler and other MW compilers are more strict than the 8/16 bit compilers when implicitely loosing the constness. Regardless, I would always code const correct in the first place so the 8/16 bit compiler do not issue a warning and the other MW compiler have no reason to issue an error.
With the assumption that send_data_to_output is not modifying the data to be sent, just add the const to the
argument list:
extern void send_data_to_output(const unsigned char *pointer, unsigned char data_size);
It's not a problem for the compiler to add a const implicitely (in the first indirection), just to loose the const is the bad thing.
If the data_size parameter is necessary probably depends on if this function is only used to send out zero terminated strings, or if it is used to send binary data too.
Daniel
PS: Please always mention the architecture, compiler version, copy paste the error message,...
PS: adding a const to the argument usually propagates further in the code. But most of the time it should not be necessary to add a cast to shutup the compiler. Just when you get to some 3'rd party sources you don't want to adapt.
Yet another PS: probably it should be "size = strlen(temp_store)" and not sizeof()-1 :smileywink: