windows.cfg: Improved configuration of _mbscmp() and _mbscmp_l().
This commit is contained in:
parent
068e5bad27
commit
558e00272d
|
@ -2589,7 +2589,7 @@ HFONT CreateFont(
|
|||
<use-retval/>
|
||||
<pure/>
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="int"/>
|
||||
<returnValue type="int">strcmp(arg1,arg2)</returnValue>
|
||||
<leak-ignore/>
|
||||
<arg nr="1" direction="in">
|
||||
<not-null/>
|
||||
|
@ -2602,12 +2602,12 @@ HFONT CreateFont(
|
|||
<strz/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int _mbscmp_l(const unsigned char *string1, const unsigned char *string2, _locale_t locale); -->
|
||||
<!-- int _mbscmp_l(const unsigned char *string1, const unsigned char *string2, _locale_t locale); -->
|
||||
<function name="_mbscmp_l,_tscmp_l">
|
||||
<use-retval/>
|
||||
<pure/>
|
||||
<noreturn>false</noreturn>
|
||||
<returnValue type="int"/>
|
||||
<returnValue type="int">strcmp(arg1,arg2)</returnValue>
|
||||
<leak-ignore/>
|
||||
<arg nr="1" direction="in">
|
||||
<not-null/>
|
||||
|
|
|
@ -16,6 +16,24 @@
|
|||
#include <mbstring.h>
|
||||
#include <wchar.h>
|
||||
|
||||
int stringCompare_mbscmp(const unsigned char *string1, const unsigned char *string2)
|
||||
{
|
||||
// cppcheck-suppress stringCompare
|
||||
(void) _mbscmp(string1, string1);
|
||||
// cppcheck-suppress staticStringCompare
|
||||
(void) _mbscmp("x", "x");
|
||||
return _mbscmp(string1, string2);
|
||||
}
|
||||
|
||||
int stringCompare_mbscmp_l(const unsigned char *string1, const unsigned char *string2, _locale_t locale)
|
||||
{
|
||||
// cppcheck-suppress stringCompare
|
||||
(void) _mbscmp_l(string1, string1, locale);
|
||||
// cppcheck-suppress staticStringCompare
|
||||
(void) _mbscmp_l("x", "x", locale);
|
||||
return _mbscmp_l(string1, string2, locale);
|
||||
}
|
||||
|
||||
int ignoredReturnValue__wtoi_l(const wchar_t *str, _locale_t locale)
|
||||
{
|
||||
// cppcheck-suppress ignoredReturnValue
|
||||
|
|
Loading…
Reference in New Issue