diff --git a/cfg/std.cfg b/cfg/std.cfg index 774e4dbf1c7d..8af76755bb35 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -3318,11 +3318,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - - - - - + @@ -3333,8 +3329,23 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + + + + + false + + + + + + - + arg1>arg2?1:0 @@ -3347,8 +3358,22 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + arg1>arg2?1:0 + false + + + + + + + + - + arg1 >= arg2?1:0 @@ -3361,12 +3386,22 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + arg1 >= arg2?1:0 + false + + + + + + + + - - - - - + @@ -3377,6 +3412,21 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + + + + + false + + + + + + diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 627d2d68bbc7..662e7218f3d8 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -2685,6 +2685,14 @@ void uninitvar_fpclassify(void) (void)std::fpclassify(ld); } +void bool_isfinite(float f) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + // cppcheck-suppress knownConditionTrueFalse + if (std::isfinite(f)==123) {} +} + void uninitvar_isfinite(void) { float f; @@ -2700,6 +2708,14 @@ void uninitvar_isfinite(void) (void)std::isfinite(ld); } +void bool_isgreater(float f1, float f2) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + // cppcheck-suppress knownConditionTrueFalse + if (std::isgreater(f1,f2)==123) {} +} + void uninitvar_isgreater(void) { float f1,f2; @@ -2715,6 +2731,14 @@ void uninitvar_isgreater(void) (void)std::isgreater(ld1,ld2); } +void bool_isgreaterequal(float f1, float f2) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + // cppcheck-suppress knownConditionTrueFalse + if (std::isgreaterequal(f1, f2)==123) {} +} + void uninitvar_isgreaterequal(void) { float f1,f2; @@ -2730,6 +2754,14 @@ void uninitvar_isgreaterequal(void) (void)std::isgreaterequal(ld1,ld2); } +void bool_isinf(float f) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + // cppcheck-suppress knownConditionTrueFalse + if (std::isinf(f)==123) {} +} + void uninitvar_isinf(void) { double d; @@ -5085,4 +5117,4 @@ void constParameterReference_assign(std::vector& v, int& r) { void constParameterReference_insert(std::list& l, int& r) { l.insert(l.end(), r); l.insert(l.end(), 5, r); -} \ No newline at end of file +}