HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)
In a 32–bit to 64–bit migration scenario, this warning is issued during bitfield packing when the
types in the structure are different.
Example:
#include<stdio.h>
enum name {first, middle, last};
struct node2
{
long l:1;
name n:1;
}head2;
int main()
{
printf ("sizeof struct node2 is : %lu\n", sizeof(head2));
return 0;
}
Action:
It is good to use similar types for bitfield packing. This is because, bitfield packing behavior might
be different across compilers.
Reference:
2.150 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:
2.151 4364 endian porting: type cast is endian dependent
Cause:
This warning is issued for pointer casts that are endian dependent.
Example:
#include<stdio.h>
68 Diagnostics Details