Format to argument type mismatch

A format specifier is not compatible with the type of the corresponding argument.

For example, "%s" prints a string, so the actual parameter should be a string, not an integer or floating point value.

ID

Observation

Description

1

Format mismatch

Place where the format string was used

Example

          
#include <stdio.h>

extern int x,y;

int main(int argc, char **argv)
{
    printf("%f %s", x, y); // format specifiers expect double and string, not int
}
        

Copyright © 2010, Intel Corporation. All rights reserved.