ref: efdb58dae55057fa552746070e859f8c43614016
parent: 21ed4a1f06a210f1285d6c6c1c5673dff751fd4c
author: Martin Storsjö <martin@martin.st>
date: Fri Apr 11 05:46:52 EDT 2014
Silence MSVC warnings about "unsafe" standard C functions in console apps Within the libraries themselves, we use other wrapper functions to make sure the functions are used safely, but this wrapper layer isn't available outside of the library in the console apps. The usage of these functions is safe here, so silence the warnings. This gets rid of all warnings when building with MSVC in 32 bit mode, making it much easier to spot new warnings.
--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -32,6 +32,7 @@
*/
#if defined (_WIN32)
+#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#include <tchar.h>
#else
--- a/codec/console/dec/src/read_config.cpp
+++ b/codec/console/dec/src/read_config.cpp
@@ -38,6 +38,7 @@
*
*****************************************************************************/
+#define _CRT_SECURE_NO_WARNINGS
#include <string.h>
#include <stdio.h>
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -30,6 +30,7 @@
*
*/
+#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <assert.h>