Improved testing of std.cfg regarding uninitialized variables.
This commit is contained in:
parent
6b49a39282
commit
651e225069
10
cfg/std.cfg
10
cfg/std.cfg
|
@ -763,7 +763,7 @@
|
||||||
<!-- double fdim(double x, double y); -->
|
<!-- double fdim(double x, double y); -->
|
||||||
<!-- float fdimf(float x, float y); -->
|
<!-- float fdimf(float x, float y); -->
|
||||||
<!-- long double fdiml(long double x, long double y); -->
|
<!-- long double fdiml(long double x, long double y); -->
|
||||||
<function name="fdim,std::fdim,fdimf,fdiml">
|
<function name="fdim,std::fdim,fdimf,std::fdimf,fdiml,std::fdiml">
|
||||||
<use-retval/>
|
<use-retval/>
|
||||||
<pure/>
|
<pure/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
|
@ -856,7 +856,7 @@
|
||||||
<!-- double fma(double x, double y, double z); -->
|
<!-- double fma(double x, double y, double z); -->
|
||||||
<!-- float fmaf(float x, float y, float z); -->
|
<!-- float fmaf(float x, float y, float z); -->
|
||||||
<!-- long double fmal(long double x, long double y, long double z); -->
|
<!-- long double fmal(long double x, long double y, long double z); -->
|
||||||
<function name="fma,std::fma,fmaf,fmal">
|
<function name="fma,std::fma,fmaf,std::fmaf,fmal,std::fmal">
|
||||||
<use-retval/>
|
<use-retval/>
|
||||||
<pure/>
|
<pure/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
|
@ -874,7 +874,7 @@
|
||||||
<!-- double fmax(double x, double y); -->
|
<!-- double fmax(double x, double y); -->
|
||||||
<!-- float fmaxf(float x, float y); -->
|
<!-- float fmaxf(float x, float y); -->
|
||||||
<!-- long double fmaxl(long double x, long double y); -->
|
<!-- long double fmaxl(long double x, long double y); -->
|
||||||
<function name="fmax,std::fmax,fmaxf,fmaxl">
|
<function name="fmax,std::fmax,fmaxf,std::fmaxf,fmaxl,std::fmaxl">
|
||||||
<use-retval/>
|
<use-retval/>
|
||||||
<pure/>
|
<pure/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
|
@ -889,7 +889,7 @@
|
||||||
<!-- double fmin(double x, double y); -->
|
<!-- double fmin(double x, double y); -->
|
||||||
<!-- float fminf(float x, float y); -->
|
<!-- float fminf(float x, float y); -->
|
||||||
<!-- long double fminl(long double x, long double y); -->
|
<!-- long double fminl(long double x, long double y); -->
|
||||||
<function name="fmin,std::fmin,fminf,fminl">
|
<function name="fmin,std::fmin,fminf,std::fminf,fminl,std::fminl">
|
||||||
<use-retval/>
|
<use-retval/>
|
||||||
<pure/>
|
<pure/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
|
@ -1093,7 +1093,7 @@
|
||||||
<!-- double hypot(double x, double y); -->
|
<!-- double hypot(double x, double y); -->
|
||||||
<!-- float hypotf(float x, float y); -->
|
<!-- float hypotf(float x, float y); -->
|
||||||
<!-- long double hypotl(long double x, long double y); -->
|
<!-- long double hypotl(long double x, long double y); -->
|
||||||
<function name="hypot,std::hypot,hypotf,hypotl">
|
<function name="hypot,std::hypot,hypotf,std::hypotf,hypotl,std::hypotl">
|
||||||
<use-retval/>
|
<use-retval/>
|
||||||
<pure/>
|
<pure/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
|
|
|
@ -1581,6 +1581,14 @@ void uninitvar_getenv(void)
|
||||||
(void)getenv(name);
|
(void)getenv(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void uninitvar_gets(void)
|
||||||
|
{
|
||||||
|
char *buffer;
|
||||||
|
// cppcheck-suppress obsoleteFunctionsgets
|
||||||
|
// cppcheck-suppress uninitvar
|
||||||
|
(void)gets(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
void uninitvar_gmtime(void)
|
void uninitvar_gmtime(void)
|
||||||
{
|
{
|
||||||
time_t *tp;
|
time_t *tp;
|
||||||
|
|
|
@ -610,7 +610,7 @@ void uninitvar_fdim(void)
|
||||||
{
|
{
|
||||||
float f1,f2;
|
float f1,f2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::fdim(f1,f2);
|
(void)std::fdimf(f1,f2);
|
||||||
|
|
||||||
double d1,d2;
|
double d1,d2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
|
@ -618,7 +618,7 @@ void uninitvar_fdim(void)
|
||||||
|
|
||||||
long double ld1,ld2;
|
long double ld1,ld2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::fdim(ld1,ld2);
|
(void)std::fdiml(ld1,ld2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitvar_fclose(void)
|
void uninitvar_fclose(void)
|
||||||
|
@ -691,7 +691,7 @@ void uninitvar_fma(void)
|
||||||
// cppcheck-suppress unassignedVariable
|
// cppcheck-suppress unassignedVariable
|
||||||
float f1,f2,f3;
|
float f1,f2,f3;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::fma(f1,f2,f3);
|
(void)std::fmaf(f1,f2,f3);
|
||||||
|
|
||||||
// cppcheck-suppress unassignedVariable
|
// cppcheck-suppress unassignedVariable
|
||||||
double d1,d2,d3;
|
double d1,d2,d3;
|
||||||
|
@ -701,14 +701,14 @@ void uninitvar_fma(void)
|
||||||
// cppcheck-suppress unassignedVariable
|
// cppcheck-suppress unassignedVariable
|
||||||
long double ld1,ld2,ld3;
|
long double ld1,ld2,ld3;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::fma(ld1,ld2,ld3);
|
(void)std::fmal(ld1,ld2,ld3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitvar_fmax(void)
|
void uninitvar_fmax(void)
|
||||||
{
|
{
|
||||||
float f1,f2;
|
float f1,f2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::fmax(f1,f2);
|
(void)std::fmaxf(f1,f2);
|
||||||
|
|
||||||
double d1,d2;
|
double d1,d2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
|
@ -716,14 +716,14 @@ void uninitvar_fmax(void)
|
||||||
|
|
||||||
long double ld1,ld2;
|
long double ld1,ld2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::fmax(ld1,ld2);
|
(void)std::fmaxl(ld1,ld2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitvar_fmin(void)
|
void uninitvar_fmin(void)
|
||||||
{
|
{
|
||||||
float f1,f2;
|
float f1,f2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::fmin(f1,f2);
|
(void)std::fminf(f1,f2);
|
||||||
|
|
||||||
double d1,d2;
|
double d1,d2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
|
@ -731,7 +731,7 @@ void uninitvar_fmin(void)
|
||||||
|
|
||||||
long double ld1,ld2;
|
long double ld1,ld2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::fmin(ld1,ld2);
|
(void)std::fminl(ld1,ld2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitvar_fmod(void)
|
void uninitvar_fmod(void)
|
||||||
|
@ -869,7 +869,7 @@ void uninitvar_hypot(void)
|
||||||
{
|
{
|
||||||
float f1,f2;
|
float f1,f2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::hypot(f1,f2);
|
(void)std::hypotf(f1,f2);
|
||||||
|
|
||||||
double d1,d2;
|
double d1,d2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
|
@ -877,7 +877,7 @@ void uninitvar_hypot(void)
|
||||||
|
|
||||||
long double ld1,ld2;
|
long double ld1,ld2;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)std::hypot(ld1,ld2);
|
(void)std::hypotl(ld1,ld2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitvar_fscanf(void)
|
void uninitvar_fscanf(void)
|
||||||
|
|
Loading…
Reference in New Issue