Skip to content

Commit bc0780c

Browse files
authored
Merge pull request #5369 from Rageking8/tweak-c4789-warning-reference
Tweak C4789 warning reference
2 parents ed619da + 4a972fb commit bc0780c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4789.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Warning (Level 1) C4789"
32
title: "Compiler Warning (Level 1) C4789"
3+
description: "Learn more about: Compiler Warning (Level 1) C4789"
44
ms.date: 08/30/2022
55
f1_keywords: ["C4789"]
66
helpviewer_keywords: ["C4789"]
7-
ms.assetid: 5800c301-5afb-4af0-85c1-ceb54d775234
87
---
98
# Compiler Warning (Level 1) C4789
109

@@ -19,9 +18,7 @@ ms.assetid: 5800c301-5afb-4af0-85c1-ceb54d775234
1918
The warning occurs if the copy uses the intrinsic form of one of these CRT functions:
2019

2120
- [`strcpy`](../../c-runtime-library/reference/strcpy-wcscpy-mbscpy.md)
22-
2321
- [`memset`](../../c-runtime-library/reference/memset-wmemset.md)
24-
2522
- [`memcpy`](../../c-runtime-library/reference/memcpy-wmemcpy.md), [`wmemcpy`](../../c-runtime-library/reference/memcpy-wmemcpy.md)
2623

2724
The warning also appears when you cast a parameter to a larger data type, and then make a copy assignment from an lvalue reference.
@@ -31,7 +28,7 @@ Visual C++ might generate this warning for a code path that never executes. You
3128
```cpp
3229
#pragma warning( push )
3330
#pragma warning( disable : 4789 )
34-
// unused code that generates compiler warning C4789`
31+
// unused code that generates compiler warning C4789
3532
#pragma warning( pop )
3633
```
3734

@@ -41,7 +38,7 @@ The [`/sdl` (Enable Additional Security Checks)](../../build/reference/sdl-enabl
4138

4239
## Examples
4340

44-
The following sample generates C4789.
41+
The following sample generates C4789:
4542

4643
```cpp
4744
// C4789.cpp
@@ -63,7 +60,7 @@ int main()
6360
}
6461
```
6562

66-
The following sample also generates C4789.
63+
The following sample also generates C4789:
6764

6865
```cpp
6966
// C4789b.cpp

0 commit comments

Comments
 (0)