std.cfg: Improved configuration for mbrlen() and extended test cases.
This commit is contained in:
parent
9a7089d262
commit
1994cbbb9c
|
@ -2312,6 +2312,7 @@
|
||||||
</arg>
|
</arg>
|
||||||
<arg nr="3" direction="inout">
|
<arg nr="3" direction="inout">
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
|
<not-null/>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
<!-- wint_t btowc(int c); -->
|
<!-- wint_t btowc(int c); -->
|
||||||
|
|
|
@ -1598,6 +1598,15 @@ void uninitvar_mbrlen(const char* p, size_t m, mbstate_t* s)
|
||||||
(void)mbrlen(p,m,s);
|
(void)mbrlen(p,m,s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nullPointer_mbrlen(const char* p, size_t m, mbstate_t* s)
|
||||||
|
{
|
||||||
|
/* no warning is expected: A call to the function with a null pointer as pmb resets the shift state (and ignores parameter max). */
|
||||||
|
(void)mbrlen(NULL,m,s);
|
||||||
|
(void)mbrlen(NULL,0,s);
|
||||||
|
/* cppcheck-suppress nullPointer */
|
||||||
|
(void)mbrlen(p,m,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void uninitvar_btowc(void)
|
void uninitvar_btowc(void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
|
@ -1106,6 +1106,15 @@ void uninitvar_mbrlen(const char* p, size_t m, mbstate_t* s)
|
||||||
(void)std::mbrlen(p,m,s);
|
(void)std::mbrlen(p,m,s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nullPointer_mbrlen(const char* p, size_t m, mbstate_t* s)
|
||||||
|
{
|
||||||
|
// no warning is expected: A call to the function with a null pointer as pmb resets the shift state (and ignores parameter max).
|
||||||
|
(void)std::mbrlen(NULL,m,s);
|
||||||
|
(void)std::mbrlen(NULL,0,s);
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void)std::mbrlen(p,m,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void uninitvar_btowc(void)
|
void uninitvar_btowc(void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
Loading…
Reference in New Issue