CPP: Add exception for pow.

This commit is contained in:
Geoffrey White
2019-01-09 15:06:23 +00:00
parent 11013b0ec6
commit f983391cbf
3 changed files with 15 additions and 5 deletions

View File

@@ -4,8 +4,6 @@
| test.cpp:40:13:40:21 | call to getDouble | Return value of type double is implicitly converted to int here. |
| test.cpp:43:6:43:12 | call to getMyLD | Return value of type long double is implicitly converted to bool here. |
| test.cpp:45:13:45:19 | call to getMyLD | Return value of type long double is implicitly converted to int here. |
| test.cpp:97:10:97:12 | call to pow | Return value of type double is implicitly converted to int here. |
| test.cpp:99:10:99:12 | call to pow | Return value of type double is implicitly converted to int here. |
| test.cpp:101:10:101:12 | call to pow | Return value of type double is implicitly converted to int here. |
| test.cpp:103:10:103:12 | call to pow | Return value of type double is implicitly converted to int here. |
| test.cpp:105:10:105:12 | call to pow | Return value of type double is implicitly converted to int here. |

View File

@@ -94,9 +94,9 @@ int test2(double v, double w, int n)
switch (n)
{
case 1:
return pow(2, v); // GOOD [FALSE POSITIVE]
return pow(2, v); // GOOD
case 2:
return pow(10, v); // GOOD [FALSE POSITIVE]
return pow(10, v); // GOOD
case 3:
return pow(2.5, v); // BAD
case 4: