Skip to content

Commit abf9752

Browse files
authored
Add "Remarks" and "Example" headings for warning references in range [C4081, C4120]
1 parent 5704ddf commit abf9752

28 files changed

+81
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 6f656373-a080-4989-bbc9-e2f894b03293
1010

1111
> expected 'token1'; found 'token2'
1212
13+
## Remarks
14+
1315
The compiler expected a different token in this context.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: e7d3344e-5645-4d56-8460-d1acc9145ada
1010

1111
> expected 'token'; found identifier 'identifier'
1212
13+
## Remarks
14+
1315
An identifier occurs in the wrong place in a **#pragma** statement.
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 2bc6eb25-058f-4597-b351-fd69587b5170
1010

1111
> expected pragma parameter to be 'on' or 'off'
1212
13+
## Remarks
14+
1315
The pragma requires an **on** or **off** parameter. The pragma is ignored.
1416

17+
## Example
18+
1519
The following sample generates C4085:
1620

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 9248831b-22bf-47af-8684-bfadb17e94fc
1010

1111
> expected pragma parameter to be '1', '2', '4', '8', or '16'
1212
13+
## Remarks
14+
1315
The pragma parameter does not have the required value (1, 2, 4, 8, or 16).
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 546e4d57-5c8e-422c-8ef1-92657336dad5
1010

1111
> 'function' : declared with 'void' parameter list
1212
13+
## Remarks
14+
1315
The function declaration has no formal parameters, but the function call has actual parameters. Extra parameters are passed according to the calling convention of the function.
1416

1517
This warning is for the C compiler.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 9bab817c-16b2-4324-be5e-f9cbb06b702e
1010

1111
> 'function' : pointer mismatch in actual parameter 'number', formal parameter 'number'
1212
13+
## Remarks
14+
1315
The corresponding formal and actual parameters have a different level of indirection. The actual parameter is passed without change. The called function interprets its value as a pointer.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 7c8f929b-9bf9-4063-9b7e-4affd98c1acc
1010

1111
> 'function' : different types in actual parameter 'number', formal parameter 'number'
1212
13+
## Remarks
14+
1315
The corresponding formal and actual parameters have different types. The actual parameter is passed without change. The function casts the actual parameter to the type specified in the function definition.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ ms.assetid: baad469d-23d4-45aa-ad9c-305b32d61e9a
1010

1111
> 'operation' : different 'modifier' qualifiers
1212
13+
## Remarks
14+
1315
A variable used in an operation is defined with a specified modifier that prevents it from being modified without detection by the compiler. The expression is compiled without modification.
1416

1517
This warning can be caused when a pointer to a **`const`** or **`volatile`** item is assigned to a pointer not declared as pointing to **`const`** or **`volatile`**.
1618

1719
This warning is issued for C programs. In a C++ program, the compiler issues an error: [C2440](../../error-messages/compiler-errors-1/compiler-error-c2440.md).
1820

21+
## Example
22+
1923
The following sample generates C4090:
2024

2125
```c

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ helpviewer_keywords: ["C4091"]
99

1010
> '*keyword*': ignored on left of '*type*' when no variable is declared
1111
12+
## Remarks
13+
1214
The compiler detected a situation where the user probably intended a variable to be declared, but the compiler wasn't able to declare the variable.
1315

1416
## Examples

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: abf3cca2-2f21-45d8-b025-6b513b00681e
1010

1111
> 'a': interface is not a COM interface; will not be emitted to IDL
1212
13+
## Remarks
14+
1315
An interface definition that you may have intended as a COM interface was not defined as a COM interface and therefore will not be emitted to the IDL file.
1416

1517
See [Interface Attributes](../../windows/attributes/interface-attributes.md) for a list attributes that indicate an interface is a COM interface.
1618

19+
## Example
20+
1721
The following sample generates C4096:
1822

1923
```cpp

0 commit comments

Comments
 (0)