Skip to content

Commit 2ee0395

Browse files
authored
Update compiler-warning-level-1-c4165.md
1 parent ed309ac commit 2ee0395

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4165"
3-
title: "Compiler Warning (level 1) C4165"
2+
description: "Learn more about: Compiler Warning (level 3, off) C4165"
3+
title: "Compiler Warning (level 3, off) C4165"
44
ms.date: "11/04/2016"
55
f1_keywords: ["C4165"]
66
helpviewer_keywords: ["C4165"]
7-
ms.assetid: f5bed515-2290-4f88-8dab-b45d95fe26ef
87
---
98
# Compiler Warning (level 3, off) C4165
109

1110
'HRESULT' is being converted to 'bool'; are you sure this is what you want?
1211

13-
When using an HRESULT in an [if](../../cpp/if-else-statement-cpp.md) statement, the HRESULT is converted to a [bool](../../cpp/bool-cpp.md) unless you explicitly test for the variable as an HRESULT. This warning is off by default.
12+
When an HRESULT is used in an [if](../../cpp/if-else-statement-cpp.md) statement, the HRESULT is converted to a [bool](../../cpp/bool-cpp.md) unless you explicitly test for the variable as an HRESULT.
1413

1514
Warning C4165 is off by default. For more information, see [Compiler Warnings That Are Off By Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md).
1615

@@ -20,9 +19,9 @@ The following sample generates C4165.
2019

2120
```cpp
2221
// C4165.cpp
23-
// compile with: /W1
22+
// compile with: /W3
2423
#include <windows.h>
25-
#pragma warning(1:4165)
24+
#pragma warning(3:4165)
2625

2726
extern HRESULT hr;
2827
int main() {

0 commit comments

Comments
 (0)