Warning C28250
Inconsistent annotation for function: the prior instance has an error.
Note: There are several prototypes for this function. This warning compares the first prototype with instance number <number>.
If a declaration is made using a typedef
, the line where the typedef
appears is more useful than the line of the declaration.
This warning refers to an error in the annotation and reflects the requirement that the annotations on a function declaration must match the ones on the definition, except if a function typedef
is involved. In that case, the function typedef
is taken as definitive for both the declaration and the definition.
Annotations are usually implemented as macros, and one macro will usually yield several low-level annotations. This warning is reported for each unmatched low-level annotation, so a single unmatched annotation macro may yield many unmatched low-level annotations. It's best to compare the declaration and definition source code to make sure that they're the same. (Trivial differences in the order of the annotations aren't reported.)
The comparison is always between the first declaration found and the current one. If there are more declarations, each declaration is checked pairwise. It's currently not possible to do a comparison other than in pairs, although it's possible to identify that there are more than two declarations/definitions. The text field above contains a list of the annotations that differ (at a fairly low level) between the two instances.
This warning message displays the text of the underlying code sent to the compiler, and not the macros that are used to actually insert the annotation in the source code (as is the case whenever macros are used). In general, you don't need to understand the low-level annotations, but you should recognize that the annotations are being reported as inconsistent between the line numbers reported in the error message. Mostly, an inspection of the source code will make it clear why the inconsistency exists.