Skip to content

Commit 7c6869c

Browse files
authored
Merge pull request #5441 from Rageking8/update-scl-secure-no-warnings-topic
Update `_SCL_SECURE_NO_WARNINGS` topic
2 parents 1b45d1d + eceae83 commit 7c6869c

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed
Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
description: "Learn more about: _SCL_SECURE_NO_WARNINGS"
32
title: "_SCL_SECURE_NO_WARNINGS"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: _SCL_SECURE_NO_WARNINGS"
4+
ms.date: 11/04/2016
55
f1_keywords: ["_SCL_SECURE_NO_DEPRECATE", "_SCL_SECURE_NO_WARNINGS"]
66
helpviewer_keywords: ["_SCL_SECURE_NO_DEPRECATE", "_SCL_SECURE_NO_WARNINGS"]
7-
ms.assetid: ef0ddea9-7c62-4b53-8b64-5f4fd369776f
87
---
9-
# _SCL_SECURE_NO_WARNINGS
8+
# `_SCL_SECURE_NO_WARNINGS`
109

11-
Calling any of the potentially unsafe methods in the C++ Standard Library results in [Compiler Warning (level 3) C4996](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). To disable this warning, define the macro _SCL_SECURE_NO_WARNINGS in your code:
10+
Calling any of the potentially unsafe methods in the C++ Standard Library results in [Compiler Warning (level 3) C4996](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). To disable this warning, define the macro `_SCL_SECURE_NO_WARNINGS` in your code:
1211

1312
```cpp
1413
#define _SCL_SECURE_NO_WARNINGS
@@ -20,26 +19,32 @@ If you use precompiled headers, put this directive in your precompiled header fi
2019

2120
Other ways to disable warning C4996 include:
2221

23-
- Using the [/D (Preprocessor Definitions)](../build/reference/d-preprocessor-definitions.md) compiler option:
22+
- Using the [`/D` (Preprocessor Definitions)](../build/reference/d-preprocessor-definitions.md) compiler option:
2423

25-
> cl /D_SCL_SECURE_NO_WARNINGS [other compiler options] myfile.cpp
24+
```cmd
25+
cl /D_SCL_SECURE_NO_WARNINGS [other compiler options] myfile.cpp
26+
```
2627

27-
- Using the [/w](../build/reference/compiler-option-warning-level.md) compiler option:
28+
- Using the [`/w`](../build/reference/compiler-option-warning-level.md) compiler option:
2829

29-
> cl /wd4996 [other compiler options] myfile.cpp
30+
```cmd
31+
cl /wd4996 [other compiler options] myfile.cpp
32+
```
3033

31-
- Using the [#pragma warning](../preprocessor/warning.md) directive:
34+
- Using the [`#pragma warning`](../preprocessor/warning.md) directive:
3235

3336
```cpp
3437
#pragma warning(disable:4996)
3538
```
3639

37-
Also, you can manually change the level of warning C4996 with the **/w\<l>\<n>** compiler option. For example, to set warning C4996 to level 4:
40+
Also, you can manually change the level of warning C4996 with the `/w<l><n>` compiler option. For example, to set warning C4996 to level 4:
3841

39-
> cl /w44996 [other compiler options] myfile.cpp
42+
```cmd
43+
cl /w44996 myfile.cpp
44+
```
4045

41-
For more information, see [/w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level)](../build/reference/compiler-option-warning-level.md).
46+
For more information, see [`/w`, `/W0`, `/W1`, `/W2`, `/W3`, `/W4`, `/w1`, `/w2`, `/w3`, `/w4`, `/Wall`, `/wd`, `/we`, `/wo`, `/Wv`, `/WX` (Warning Level)](../build/reference/compiler-option-warning-level.md).
4247

4348
## See also
4449

45-
[Safe Libraries: C++ Standard Library](../standard-library/safe-libraries-cpp-standard-library.md)
50+
[Safe Libraries: C++ Standard Library](safe-libraries-cpp-standard-library.md)

0 commit comments

Comments
 (0)