Skip to content

Commit

Permalink
added a#ifndef _CRT_SECURE_NO_WARNINGS to several stdafx.h
Browse files Browse the repository at this point in the history
  • Loading branch information
frankseide committed Dec 23, 2015
1 parent af84f92 commit 81eeff1
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Source/CNTK/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#pragma once

#ifdef _WIN32
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif
#include "targetver.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion Source/ComputationNetworkLib/ComputationNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extern bool g_shareNodeValueMatrices;

// helper mode for debugging
// If TRACK_GAP_NANS is defined then initialize layout gaps to NaN and do NaN checks. Also do detailed logging of node computations.
#define TRACK_GAP_NANS
// #define TRACK_GAP_NANS

namespace Microsoft { namespace MSR { namespace CNTK {

Expand Down
4 changes: 3 additions & 1 deletion Source/EvalDll/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

#pragma once

#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif
#ifdef _WIN32
#include "targetver.h"
#endif
Expand Down
2 changes: 2 additions & 0 deletions Source/Math/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

#include "targetver.h"

#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif

// Windows Header Files:
#ifdef _WIN32
Expand Down
4 changes: 4 additions & 0 deletions Source/Readers/DSSMReader/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

#include "targetver.h"

#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
Expand Down
4 changes: 3 additions & 1 deletion Source/Readers/Kaldi2Reader/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

#pragma once

#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif

#ifndef __unix__
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
Expand Down
4 changes: 3 additions & 1 deletion Source/Readers/KaldiReader/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

#pragma once

#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif

#ifndef __unix__
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
Expand Down
4 changes: 4 additions & 0 deletions Source/Readers/SparsePCReader/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

#include "targetver.h"

#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
Expand Down
4 changes: 3 additions & 1 deletion Source/Readers/UCIFastReader/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

#pragma once

#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif
#include "Platform.h"
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms
#include "targetver.h"
#ifdef __WINDOWS__
#include "windows.h"
Expand Down
4 changes: 3 additions & 1 deletion Source/SGDLib/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#pragma once

#ifdef _WIN32
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif
#include "targetver.h"
#endif

Expand Down
4 changes: 3 additions & 1 deletion Tests/UnitTests/MathTests/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

#pragma once

#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS // "secure" CRT not available on all platforms --add this at the top of all CPP files that give "function or variable may be unsafe" warnings
#endif
#define _SCL_SECURE_NO_WARNINGS // current API of matrix does not allow safe invokations. TODO: change api to proper one.

#include "targetver.h"
Expand Down

0 comments on commit 81eeff1

Please sign in to comment.