Fixed #6974 - false negative: uninitialized variable not detected (signal).
This commit is contained in:
parent
687bde8af5
commit
27b3461e84
|
@ -2735,12 +2735,15 @@
|
|||
</function>
|
||||
<!-- void (*signal(int sig, void (*func)(int)))(int); -->
|
||||
<function name="signal,std::signal">
|
||||
<noreturn>true</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
<arg nr="2"/>
|
||||
</function>
|
||||
<!-- int raise(int sig); -->
|
||||
<function name="raise,std::raise">
|
||||
<noreturn>true</noreturn>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
|
|
|
@ -16,7 +16,7 @@ CPPCHECK_OPT='--check-library --enable=information --enable=style --error-exitco
|
|||
CXX=g++
|
||||
CXX_OPT='-fsyntax-only -std=c++0x'
|
||||
CC=gcc
|
||||
CC_OPT='-Wno-nonnull -Wno-implicit-function-declaration -fsyntax-only'
|
||||
CC_OPT='-Wno-nonnull -Wno-implicit-function-declaration -Wno-deprecated-declarations -fsyntax-only'
|
||||
|
||||
# posix.c
|
||||
${CC} ${CC_OPT} ${DIR}posix.c
|
||||
|
|
|
@ -2702,7 +2702,7 @@ void uninitvar_signbit(void)
|
|||
// cppcheck-suppress uninitvar
|
||||
(void)signbit(d);
|
||||
}
|
||||
#if 0
|
||||
|
||||
void uninivar_signal(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -2716,4 +2716,3 @@ void uninivar_raise(void)
|
|||
// cppcheck-suppress uninitvar
|
||||
(void)raise(i);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <cfenv>
|
||||
#include <csetjmp>
|
||||
#include <cmath>
|
||||
#include <csignal>
|
||||
|
||||
void bufferAccessOutOfBounds(void)
|
||||
{
|
||||
|
@ -2025,7 +2026,6 @@ void uninitvar_signbit(void)
|
|||
(void)std::signbit(d);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void uninivar_signal(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -2039,4 +2039,3 @@ void uninivar_raise(void)
|
|||
// cppcheck-suppress uninitvar
|
||||
(void)std::raise(i);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue