What is the benefit of the use of the num variable?
Your code could be shortened to:
private static int BitwiseRotate(int x, int c) {
return (x << c) | (x >> (32 - c));
}
No need to cross cast between int and uint.
I think the problem you had in the first place was that you forgot some parenthesis:
x >> 32 - c
should have been
x >> (32 - c)
because the right-shift operator has precedence over subtraction; thus the compiler understood
(x >> 32) - c
which it logically reported as potentially problematic.
Hope this makes sense.