Warning C28039

The type of actual parameter 'operand' should exactly match the type 'typename'

This warning is reported when an enum formal wasn't passed a member of the enum, but may also be used for other types.

Because C permits enum types to be used interchangeably, and interchangeably with constants, it's 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.