HP Code Advisor Diagnostics

parameters being passed in the call. This warning is issued when there is a mismatch in the
parameter types between different call.
Example:
File 1.c
int main()
{
int i, j;
i = ggg(10);
j = ggg(10.3);
}
File 2.c
int ggg(long a)
{
return 0;
}
Action:
Add prototypes for all external functions that is called in the file.
Reference:
4364 endian porting: type cast is endian dependent
Cause:
This warning is issued for pointer casts that are endian dependent.
Example:
#include<stdio.h>
int main()
{
int *p;
short q = 0x0123;
p = (int *)&q;
printf("%d\n", *p);
}
On a big-endian system, the output will be: 19070976. Whereas, on a little-endian system, the
output will be: 291
Action:
Pointer type casting to different data size is unusual, and might be done by mistake - check if
this is what you intended.
Reference:
20035 variable %s is used before its value is set
Cause:
The compiler has detected use of a variable's value before it is set.
Example:
int func(int b)
{
int a;
a = a + b; // warning 20035 for use of variable a
return a;
72 Diagnostics Details