Merge pull request #675 from mstorsjo/silence-crt-unsafe-warnings

Silence MSVC warnings about "unsafe" standard C functions in console apps
This commit is contained in:
Ethan Hugg 2014-04-12 10:14:37 -07:00
commit ca36beb3fa
4 changed files with 4 additions and 9 deletions

View File

@ -32,6 +32,7 @@
*/
#if defined (_WIN32)
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#include <tchar.h>
#else

View File

@ -38,6 +38,7 @@
*
*****************************************************************************/
#define _CRT_SECURE_NO_WARNINGS
#include <string.h>
#include <stdio.h>

View File

@ -38,15 +38,11 @@
*
*****************************************************************************/
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include "read_config.h"
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996)
#endif
CReadConfig::CReadConfig()
: m_pCfgFile (NULL)
, m_strCfgFileName ("")
@ -141,7 +137,3 @@ const bool CReadConfig::ExistFile() {
const string& CReadConfig::GetFileName() {
return m_strCfgFileName;
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif

View File

@ -30,6 +30,7 @@
*
*/
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <assert.h>