|If you insist that a is an int and b is a byte then you can't fix it. Consider the case when a = 255. Then the code will set a to 256 and b to 0. That is the loss of precision. Or, even worse, if a = 254 then after the code you will have a = 255 and b = -1.|
If it doesn't matter to you, and is that result is what you require, then you can ignore the warning ( or use a cast to suppress it).