std.cfg: Added more functions from <cuchar> and corresponding test cases.

This commit is contained in:
Martin Ettl 2015-09-21 13:40:56 +02:00
parent 39622417b1
commit 55ccaea4a5
2 changed files with 105 additions and 0 deletions

View File

@ -3871,6 +3871,72 @@
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- size_t c16rtomb ( char * pmb, char16_t c16, mbstate_t * ps ); -->
<function name="c16rtomb">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- size_t c32rtomb ( char * pmb, char32_t c32, mbstate_t * ps ); -->
<function name="c32rtomb">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- size_t mbrtoc16 ( char16_t * pc16, const char * pmb, size_t max, mbstate_t * ps); -->
<function name="mbrtoc16">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<arg nr="4">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- size_t mbrtoc32 ( char32_t * pc32, const char * pmb, size_t max, mbstate_t * ps); -->
<function name="mbrtoc32">
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-uninit/>
</arg>
<arg nr="4">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- Not part of standard, but widely supported by runtime libraries. --> <!-- Not part of standard, but widely supported by runtime libraries. -->
<!-- char * itoa (int value, char * str, int base); --> <!-- char * itoa (int value, char * str, int base); -->
<function name="itoa"> <function name="itoa">

View File

@ -12,6 +12,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <tgmath.h> // frexp #include <tgmath.h> // frexp
#include <wchar.h> #include <wchar.h>
#include <uchar.h>
#include <wctype.h> #include <wctype.h>
#include <fenv.h> #include <fenv.h>
#include <setjmp.h> #include <setjmp.h>
@ -3384,6 +3385,44 @@ void uninitvar_itoa(void)
(void)itoa(value,str,base); (void)itoa(value,str,base);
} }
void uninivar_c16rtomb(void)
{
char * pmb;
char16_t c16;
mbstate_t * ps;
// cppcheck-suppress uninitvar
(void)c16rtomb(pmb,c16,ps);
}
void uninivar_c32rtomb(void)
{
char * pmb;
char32_t c32;
mbstate_t * ps;
// cppcheck-suppress uninitvar
(void)c32rtomb(pmb,c32,ps);
}
void uninivar_mbrtoc16(void)
{
char16_t * pc16;
char * pmb;
size_t max;
mbstate_t * ps;
// cppcheck-suppress uninitvar
(void)mbrtoc16(pc16,pmb,max,ps);
}
void uninivar_mbrtoc32(void)
{
char32_t * pc32;
char * pmb;
size_t max;
mbstate_t * ps;
// cppcheck-suppress uninitvar
(void)mbrtoc32(pc32,pmb,max,ps);
}
void invalidFunctionArgBool_abs(bool b, double x, double y) void invalidFunctionArgBool_abs(bool b, double x, double y)
{ {
// cppcheck-suppress invalidFunctionArgBool // cppcheck-suppress invalidFunctionArgBool