|
EtherealRe: [Ethereal-dev] Help with "different 'const' qualifiers", "pointer mismatch for a ctual parameter |
|
||
Francisco Alcoba (TS/EEM) wrote:
So, if I have
address tmp_src, tmp_dst; guint32 ipv4_address;
and do g_free(tmp_src.data); or g_memmove(tmp_src.data,&ipv4_address,4);
I get both warnings in a row. I do not have them if I do
g_free((void *)tmp_src.data)
but I'm not sure this is OK -meaning, it will do what I need without breaking anything else-.
For initializing the data, I'd do
guint32 *src_data;
src_data = g_malloc(sizeof *src_data); *src_data = ipv4_address; tmp_src.data = &src_data;
I've found a reference to a similar situation, that claims this to be some sort of VC6-specific behaviour,
$ cat foo.c #include <stdlib.h>
Powered by MHonArc 2.6.10