mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
42 lines
614 B
C#
42 lines
614 B
C#
public class MySignAnalysis
|
|
{
|
|
|
|
public void UnsignedRightShiftSign(int x, int y)
|
|
{
|
|
int z;
|
|
if (x == 0)
|
|
{
|
|
z = x >>> y;
|
|
}
|
|
|
|
if (y == 0)
|
|
{
|
|
z = x >>> y;
|
|
}
|
|
|
|
if (x > 0 && y == 0)
|
|
{
|
|
z = x >>> y;
|
|
}
|
|
|
|
if (x > 0 && y > 0)
|
|
{
|
|
z = x >>> y;
|
|
}
|
|
|
|
if (x > 0 && y < 0)
|
|
{
|
|
z = x >>> y;
|
|
}
|
|
|
|
if (x < 0 && y > 0)
|
|
{
|
|
z = x >>> y;
|
|
}
|
|
|
|
if (x < 0 && y < 0)
|
|
{
|
|
z = x >>> y;
|
|
}
|
|
}
|
|
} |