Please help in solving the warning "cast increases required alignment of target type"
I have two structures as below
Code:
struct prefix
{
u_char a;
u_char b;
u_char c;
u_char d;
u_char e[4];
};
struct in_addr
{
union{
u_int8_t addr8[16];
u_int16_t addr16[8];
u_int32_t addr32[4];
} in6;
}
When I used the above structures as a function argument as below
.....
.....
log(.......,(struct in_addr*)p->addr32,......); // where p is a pointer to structure prefix
.....
.....
at that point, I am getting the warning as "cast increases required alignment of target type".
Please help me