Skip to content

Commit

Permalink
Review 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-paidis-sonarsource committed Jul 12, 2024
1 parent e678e90 commit 83a754b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ public void Foo(IEnumerable enumerable, IEnumerable<object> genericEnumerable)
// https://github.com/SonarSource/sonar-dotnet/issues/9498
public class Repro_9498
{
void Sample()
void Sample(float x)
{
float x = 3.14f;
float res = 1 / (float)(x * 2); // Fixed
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@ public void Foo(IEnumerable enumerable, IEnumerable<object> genericEnumerable)
// https://github.com/SonarSource/sonar-dotnet/issues/9498
public class Repro_9498
{
void Sample()
void Sample(float x)
{
float x = 3.14f;
float res = 1 / (float)(x * 2); // Noncompliant FP
}
}
Expand Down

0 comments on commit 83a754b

Please sign in to comment.