std.cfg: Added returnValue support for iswblank().
This commit is contained in:
parent
469ca6af1b
commit
75124317e9
|
@ -1543,6 +1543,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
|
|||
<pure/>
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<returnValue type="int">arg1==L' ' || arg1==L'\t'</returnValue>
|
||||
<arg nr="1">
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
|
|
|
@ -3692,8 +3692,9 @@ void invalidPrintfArgType_printf(void)
|
|||
void valueFlow(void)
|
||||
{
|
||||
const char abc[] = "abc";
|
||||
int three = 3, minusThree = -3;
|
||||
int c0='0', ca='a', blank=' ', tab='\t';
|
||||
const int three = 3, minusThree = -3;
|
||||
const int c0='0', ca='a', blank=' ', tab='\t';
|
||||
const wint_t wblank=L' ', wtab=L'\t', w0=L'0';
|
||||
|
||||
// When adding functions below, please sort alphabetically.
|
||||
|
||||
|
@ -3713,6 +3714,14 @@ void valueFlow(void)
|
|||
AssertAlwaysTrue(isdigit(c0) == 1);
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
AssertAlwaysTrue(isdigit(ca) == 0);
|
||||
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
AssertAlwaysTrue(iswblank(wblank) == 1);
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
AssertAlwaysTrue(iswblank(wtab) == 1);
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
AssertAlwaysTrue(iswblank(w0) == 0);
|
||||
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
AssertAlwaysTrue(labs(three) == 3);
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
|
|
|
@ -3218,6 +3218,6 @@ void stdalgorithm(const std::list<int> &ints1, const std::list<int> &ints2)
|
|||
|
||||
// <!-- Function std::for_each(InputIterator first, InputIterator last, Function func) -->
|
||||
// cppcheck-suppress mismatchingContainers
|
||||
std::for_each(ints1.begin(), ints2.end(), [](int i){});
|
||||
std::for_each(ints1.begin(), ints2.end(), [](int i) {});
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue