HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)
extern i;
a();
b(){}
extern c();
extern d(){}
Action:
Add an explicit type for the declaration or definition.
Reference:
C99 6.7.2(2), ANSI/ISO C++ 7.1.5(2)
2.85 2940 missing return statement at end of non-void function "function"
Cause:
A function with an explicit return type does not contain a return statement.
Example:int foo() { }
Action:
If the function is supposed to return a value, add a return statement with appropriate value, otherwise
declare the return type as void.
Reference:
2.86 2951 return type of function "main" must be int
Cause:
Standard C requires that the return type of "main" function must int. In case of non int return type
the status value returned to the environment may not be what you expect. Also, this code is not
portable.
Example:long main() { }
Action:
Define the "main" function with a return type of int for maximal portability.
Reference:
C99 5.1.2.2.1
2.87 2991 extra braces are nonstandard
Cause:
An initializer contains extra open or close braces for the object being initialized.
Example:int arr [4] = { { 0 } };
Action:
Remove extra braces.
Reference:
2.88 3000 a storage class may not be specified here
Cause:
A storage class can only be specified for an object or a function.
Example:static enum nothing { nil = 0 };
Action:
48 Diagnostics Details