mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C#: Add ConstantConditionBad file.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class Bad
|
||||
{
|
||||
public int Max(int a, int b)
|
||||
{
|
||||
return a > a ? a : b; // $ Alert
|
||||
}
|
||||
}
|
||||
@@ -25,11 +25,6 @@ namespace ConstantIfCondition
|
||||
}
|
||||
}
|
||||
|
||||
public int Max(int a, int b)
|
||||
{
|
||||
return a > a ? a : b; // $ Alert
|
||||
}
|
||||
|
||||
public int Bar()
|
||||
{
|
||||
return ZERO;
|
||||
|
||||
Reference in New Issue
Block a user