The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at C28039.

warning C28039: The type of actual parameter <operand> should exactly match the type <typename>

This warning is usually reported when an enum formal was not passed a member of the enum, but may also be used for other types.

Because C permits enums to be used interchangeably, and interchangeably with constants, it is easy to pass the wrong enum value to a function without an error.

For enum types, if the type of an enum parameter is annotated with _Enum_is_bitflag_, arithmetic is permitted on the parameter. Otherwise the parameter must be of exactly the correct type. If a constant is strictly required, warning C28137 may also apply.

This rule can be used for other parameter types as well; see the function documentation for why the types must match exactly.