diff --git a/cfg/std.cfg b/cfg/std.cfg index ffbc5dccc..253dd4dd4 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -279,7 +279,7 @@ - + false @@ -296,7 +296,7 @@ - + false @@ -322,7 +322,7 @@ - + false @@ -330,7 +330,7 @@ - + false @@ -339,7 +339,7 @@ - + false @@ -351,7 +351,7 @@ - + false @@ -359,7 +359,7 @@ - + false @@ -367,7 +367,7 @@ - + false diff --git a/test/cfg/std.c b/test/cfg/std.c index e11da2b90..65951f5b6 100644 --- a/test/cfg/std.c +++ b/test/cfg/std.c @@ -635,7 +635,7 @@ void uninitvar_feclearexcept(void) { int i; // cppcheck-suppress uninitvar - feclearexcept(i); + (void)feclearexcept(i); } void uninitvar_fegetexceptflag(fexcept_t* flagp) @@ -659,14 +659,6 @@ void uninitvar_fesetenv(void) (void)fesetenv(envp); } -void uninitvar_fesetexceptflag(void) -{ - fexcept_t* flagp; - int excepts; - // cppcheck-suppress uninitvar - (void)fesetexceptflag(flagp, excepts); -} - void uninitvar_fesetround(void) { int i; diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index c63757ef1..915f7c2af 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -15,6 +15,7 @@ #include #include #include +#include void bufferAccessOutOfBounds(void) { @@ -354,3 +355,52 @@ void uninitvar_atol(void) // cppcheck-suppress uninitvar (void)std::atoll(c); } + +void uninitvar_feraiseexcept(void) +{ + int excepts; + // cppcheck-suppress uninitvar + (void)std::feraiseexcept(excepts); +} + +void uninitvar_fesetexceptflag(fexcept_t* flagp) +{ + int excepts; + // cppcheck-suppress uninitvar + (void)std::fesetexceptflag(flagp, excepts); +} + +void uninitvar_feclearexcept(void) +{ + int i; + // cppcheck-suppress uninitvar + (void)std::feclearexcept(i); +} + +void uninitvar_fesetenv(void) +{ + fenv_t* envp; + // cppcheck-suppress uninitvar + (void)std::fesetenv(envp); +} + +void uninitvar_fesetround(void) +{ + int i; + // cppcheck-suppress uninitvar + (void)std::fesetround(i); +} + +void uninitvar_fetestexcept(void) +{ + int i; + // cppcheck-suppress uninitvar + (void)std::fetestexcept(i); +} + +void uninitvar_feupdateenv(void) +{ + fenv_t* envp; + // cppcheck-suppress uninitvar + (void)std::feupdateenv(envp); +}