From b1b0c920e3dab68561e0bfba7859e48c3a5ffdcb Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Thu, 19 May 2016 08:22:40 +0200 Subject: [PATCH] Removed sprintf_s from windows.cfg. --- cfg/windows.cfg | 19 ------------------- test/testio.cpp | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/cfg/windows.cfg b/cfg/windows.cfg index 5716f4bbc..ad67db3ca 100644 --- a/cfg/windows.cfg +++ b/cfg/windows.cfg @@ -1743,25 +1743,6 @@ - - - false - - - - - - - 0: - - - - - - - - diff --git a/test/testio.cpp b/test/testio.cpp index 1f13eb7f4..ab6a9673b 100644 --- a/test/testio.cpp +++ b/test/testio.cpp @@ -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()); }