HP-UX Cadvise Diagnostics Reference Guide (5900-1865, August 2012)

Table Of Contents
}
Action:
Declare the function before it is referenced.
Reference:
C99 6.5.2.2
2224 the format string requires additional arguments
Cause:
The number of conversion specifiers is more than the number of values to be converted as specified
in the parameter list.
Example:printf("%d %d", 2);
Action:
Make sure the number of conversion specifiers match the number of values to be converted.
Reference:
2225 the format string ends before this argument
Cause:
The number of conversion specifiers is less than the number of values to be converted as specified
in the parameter list.
Example: printf("%d ", 2, 2);
Action:
Make sure the number of conversion specifiers match the values to be converted.
Reference:
2226 invalid format string conversion
Cause:
The compiler has detected an ill formed conversion specification (flags, width, precision, length
modifier) or an unknown conversion specifier (not diouxefgcspn...) that will cause unpredictable
behavior.
Example: printf("%z ", 2);
Action:
Review the documentation for this function and modify the conversion specification as appropriate.
Reference:
2228 trailing comma is nonstandard
Cause:
Accepting an enumerator list that contains a trailing comma is an extension of HP C provided for
compatibility with other C compilers. An enumerator list with a trailing comma is not valid in C89,
nor in C++.The C99 standard does permit this syntax.
Example:
typedef enum Switch {
on,
off,
} var;
Action:
Remove the trailing comma.
34 Diagnostics Details