std library: Resolve two TODOs (#1074)
First resolved TODO in std.c is obsolete since the "res" variable is used later and there is therefore no warning issued. Second resolved TODO in std.c: A warning for uninit variables is issued by cppcheck, so this check can be enabled. Since assert() has no noreturn configuration (currently a useful configuration is not really possible, see ticket 8329) the check-library message is suppressed.
This commit is contained in:
parent
cd5adf0707
commit
bbe9fad81d
|
@ -201,7 +201,6 @@ void nullpointer(int value)
|
|||
|
||||
// #6100 False positive nullPointer - calling mbstowcs(NULL,)
|
||||
res += mbstowcs(0,"",0);
|
||||
// TODO cppcheck-suppress unreadVariable
|
||||
res += wcstombs(0,L"",0);
|
||||
|
||||
strtok(NULL,"xyz");
|
||||
|
@ -483,14 +482,13 @@ void uninitvar_asctime(void)
|
|||
(void)asctime(tm);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void uninitvar_assert(void)
|
||||
{
|
||||
int i;
|
||||
// TODO cppcheck-suppress uninitvar
|
||||
// cppcheck-suppress checkLibraryNoReturn
|
||||
// cppcheck-suppress uninitvar
|
||||
assert(i);
|
||||
}
|
||||
#endif
|
||||
|
||||
void uninitvar_sqrt(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue