Skip to content

Commit 569fde0

Browse files
authored
windows.cfg: Issue a warning for deprecated functions stricmp() and w… (danmar#7184)
…csicmp()
1 parent ca0bcae commit 569fde0

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

cfg/windows.cfg

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,17 +2292,53 @@
22922292
<not-uninit/>
22932293
</arg>
22942294
</function>
2295-
<!-- int stricmp(const char *s1, const char *s2); -->
22962295
<!-- int _stricmp(const char *s1, const char *s2); -->
2297-
<!-- int wcsicmp(const wchar_t *s1, const wchar_t *s2); -->
22982296
<!-- int _wcsicmp(const wchar_t *s1, const wchar_t *s2); -->
22992297
<!-- int _mbsicmp(const unsigned char *string1, const unsigned char *string2); -->
23002298
<!-- https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/stricmp-wcsicmp-mbsicmp-stricmp-l-wcsicmp-l-mbsicmp-l?view=msvc-170 -->
2301-
<function name="stricmp,_stricmp,wcsicmp,_wcsicmp,_mbsicmp,_tcsicmp">
2299+
<function name="_stricmp,_wcsicmp,_mbsicmp,_tcsicmp">
2300+
<noreturn>false</noreturn>
2301+
<returnValue type="int"/>
2302+
<leak-ignore/>
2303+
<use-retval/>
2304+
<arg nr="1" direction="in">
2305+
<not-uninit/>
2306+
<not-null/>
2307+
<strz/>
2308+
</arg>
2309+
<arg nr="2" direction="in">
2310+
<not-uninit/>
2311+
<not-null/>
2312+
<strz/>
2313+
</arg>
2314+
</function>
2315+
<!-- int stricmp(const char *s1, const char *s2); -->
2316+
<!-- https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/stricmp-wcsicmp?view=msvc-170 -->
2317+
<function name="stricmp">
2318+
<noreturn>false</noreturn>
2319+
<returnValue type="int"/>
2320+
<leak-ignore/>
2321+
<use-retval/>
2322+
<warn severity="style" reason="Obsolescent" alternatives="_stricmp"/>
2323+
<arg nr="1" direction="in">
2324+
<not-uninit/>
2325+
<not-null/>
2326+
<strz/>
2327+
</arg>
2328+
<arg nr="2" direction="in">
2329+
<not-uninit/>
2330+
<not-null/>
2331+
<strz/>
2332+
</arg>
2333+
</function>
2334+
<!-- int wcsicmp(const wchar_t *s1, const wchar_t *s2); -->
2335+
<!-- https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/stricmp-wcsicmp?view=msvc-170 -->
2336+
<function name="wcsicmp">
23022337
<noreturn>false</noreturn>
23032338
<returnValue type="int"/>
23042339
<leak-ignore/>
23052340
<use-retval/>
2341+
<warn severity="style" reason="Obsolescent" alternatives="_wcsicmp"/>
23062342
<arg nr="1" direction="in">
23072343
<not-uninit/>
23082344
<not-null/>

0 commit comments

Comments
 (0)