The compiler is merely trying to warn you that the int used in the calculation can become truncated when converted into a byte (since a byte can't hold the entire range of an int).
So to avoid these warnings, first and foremost, try to use the same types or use code that causes integer promotion (ie smaller to bigger). If using a function that returns something like that, use a cast to silence the warning, but make sure it actually doesn't truncate that returned number.