If the 8 bit variable is passed by value then there should not be a problem because the compiler doesn't pass 8 bit values anyway, the smallest that can be put on the stack is 16 bit variables (with a 32-bit compiler on an Intel beased computer). Casting can lead to huge problems if the variable is passed by reference (or pointer) because then the receiving function will be expecting a pointer to a 16 bit variable.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343