PC-lint/FlexeLint Output | Reference Manual Explanation | Home Page

            bug557.cpp

1     #include <stdio.h>
2
3     /*  greetings(pop,pct), where pop is the population of a planet and
4         where pct is the percentage of C/C++ programmers living on the
5         planet, will deliver the characteristic C/C++ greeting to that planet.
6      */
7
8     void greetings( double pop, double pct )
9         {
10        printf( "%y C/C++ programmers say '%s'.\n",
11                    pop * pct/100, "Hello World" );
12        }
13
14    int main()
15        {
16        greetings( 6e+9, .02 );
17        return 0;
18        }

Something's going wrong with this program. The characteristic C/C++ greeting intended for the people of earth never gets delivered. What's going wrong?


bug557.cpp lint Output


--- Module:   bug557.cpp
               _
    printf( "%y C/C++ programmers say '%s'.\n",
bug557.cpp(10) : Warning 557: unrecognized format

Reference Manual Explanation

 
557   unrecognized format  -- The format string supplied to
      printf, fprintf, sprintf, scanf, fscanf, or sscanf was not
      recognized.  It is neither a standard format nor is it a
      user-defined format (see printf_code and scanf_code,
      Section 5.7 Other Options).

If you have comments or questions about this bug, please post them to our   Discussion Forum

Previous Bug - Bug #558 - October 2002

PC-lint/FlexeLint - Product Overview

Home | Contact | Order

PC-lint and FlexeLint are trademarks of Gimpel Software
Copyright 2003, Gimpel Software