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

Table Of Contents
It is good to use similar types for bitfield packing. This is because, bitfield packing behavior might
be different across compilers.
Reference:
4363 possible mismatch in parameters passed to %n, previously seen %p
Cause:
During compilation of C programs, when a function is called without prototype, the compiler is
unaware of the exact parameter types. It tries to fetch this information from the actual parameters
being passed in the call. This warning is issued when there is a mismatch in the parameter types
between different calls.
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 the external functions that are 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 is: 19070976. Whereas, on a little-endian system, the output
is: 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:
4365 endian porting: the definition of the union may be endian dependent
Cause:
68 Diagnostics Details