Removed sprintf_s from windows.cfg.
This commit is contained in:
parent
46adf180d7
commit
b1b0c920e3
|
@ -1743,25 +1743,6 @@
|
|||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ... );
|
||||
int swprintf_s(wchar_t *buffer, size_t sizeOfBuffer, const wchar_t *format, ...);-->
|
||||
<function name="sprintf_s,swprintf_s">
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1">
|
||||
<minsize type="argvalue" arg="2"/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-uninit/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
<formatstr/>
|
||||
<arg nr="3">
|
||||
<formatstr/>
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int _sprintf_s_l(char *buffer, size_t sizeOfBuffer, const char *format, locale_t locale, ... );
|
||||
int _swprintf_s_l(wchar_t *buffer, size_t sizeOfBuffer, const wchar_t *format, locale_t locale, ...);-->
|
||||
<function name="_sprintf_s_l,_swprintf_s_l">
|
||||
|
|
|
@ -2564,6 +2564,7 @@ private:
|
|||
" char lineBuffer [600];\n"
|
||||
" const char * const format = \"%15s%17s%17s%17s%17s\n\";\n"
|
||||
" sprintf_s(lineBuffer, 600, format, \"type\", \"sum\", \"avg\", \"min\", \"max\");\n"
|
||||
" sprintf_s(lineBuffer, format, \"type\", \"sum\", \"avg\", \"min\", \"max\");\n"
|
||||
"}\n", false, false, Settings::Win32A);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
|
@ -2572,15 +2573,18 @@ private:
|
|||
" const char format2[] = \"%15s%17s%17s%17s%17s\n\";\n"
|
||||
" const char * const format3 = format1;\n"
|
||||
" int i = 0;\n"
|
||||
" sprintf_s(lineBuffer, 100, format1, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf_s(lineBuffer, 100, format2, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf_s(lineBuffer, 100, format3, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf_s(lineBuffer, format1, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf_s(lineBuffer, format2, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf_s(lineBuffer, format3, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf(lineBuffer, format1, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf(lineBuffer, format2, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf(lineBuffer, format3, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" printf(format1, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" printf(format2, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" printf(format3, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf_s(lineBuffer, 100, format1, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf_s(lineBuffer, 100, format2, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
" sprintf_s(lineBuffer, 100, format3, \"type\", \"sum\", \"avg\", \"min\", i, 0);\n"
|
||||
"}\n", false, false, Settings::Win32A);
|
||||
ASSERT_EQUALS("[test.cpp:6]: (warning) %s in format string (no. 5) requires 'char *' but the argument type is 'int'.\n"
|
||||
"[test.cpp:6]: (warning) sprintf_s format string requires 5 parameters but 6 are given.\n"
|
||||
|
@ -2599,7 +2603,13 @@ private:
|
|||
"[test.cpp:13]: (warning) %s in format string (no. 5) requires 'char *' but the argument type is 'int'.\n"
|
||||
"[test.cpp:13]: (warning) printf format string requires 5 parameters but 6 are given.\n"
|
||||
"[test.cpp:14]: (warning) %s in format string (no. 5) requires 'char *' but the argument type is 'int'.\n"
|
||||
"[test.cpp:14]: (warning) printf format string requires 5 parameters but 6 are given.\n", errout.str());
|
||||
"[test.cpp:14]: (warning) printf format string requires 5 parameters but 6 are given.\n"
|
||||
"[test.cpp:15]: (warning) %s in format string (no. 5) requires 'char *' but the argument type is 'int'.\n"
|
||||
"[test.cpp:15]: (warning) sprintf_s format string requires 5 parameters but 6 are given.\n"
|
||||
"[test.cpp:16]: (warning) %s in format string (no. 5) requires 'char *' but the argument type is 'int'.\n"
|
||||
"[test.cpp:16]: (warning) sprintf_s format string requires 5 parameters but 6 are given.\n"
|
||||
"[test.cpp:17]: (warning) %s in format string (no. 5) requires 'char *' but the argument type is 'int'.\n"
|
||||
"[test.cpp:17]: (warning) sprintf_s format string requires 5 parameters but 6 are given.\n", errout.str());
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue