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


1     #include <stdio.h>
3     int main()
4         {
5         printf( "%s %s\n", "Greetings to all people"
6                            "on Earth" );
7         return 0;
8         }

In this slight variation of Brian Kernighan's famous "Hello World" program the greetings turn out to be a little garbled. What's going on?

bug558.cpp lint Output

--- Module:   bug558.cpp
                       "on Earth" );
bug558.cpp(6) : Warning 558: Too few arguments for format (1 missing)

Reference Manual Explanation

558   Too few arguments for format (Integer missing)  -- The number of arguments supplied
      to printf, sprintf, fprintf, scanf, fscanf or sscanf was less than the number
      expected as a result of analyzing the format string.  The number of missing arguments
      is given by Integer.  See also Message 719.

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

Previous Bug - Bug #702 - September 2002

PC-lint/FlexeLint - Product Overview

Home | Contact | Order

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