Testing out some new CodeQL rules locally. One of them flagged a line in WPF that appears suspicious.
|
return (ulong)(status) >> 30 == 3; |
This expression always returns false because an explicit cast from int -> ulong is actually treated by the compiler as int -> long -> ulong (note the intermediate implicit sign-extending cast).