I get this loss of precision message on the last line of the function below converting data to BCD form.
This message once again confuses me as there no 'ints'.
Can I safely ignore the message or how do I get rid of it?
This message once again confuses me as there no 'ints'.
Can I safely ignore the message or how do I get rid of it?
Code:
unsigned char get_bcd(unsigned char data)
{
unsigned char nibh;
unsigned char nibl;
nibh=data/10;
nibl=data-(nibh*10);
return((nibh<<4) | nibl);
}