|
Ethereal[Ethereal-dev] Help with "different 'const' qualifiers", "pointer mismatch for a ctual parameter" |
|
||
Hi,
I'm finding lots of warnings "different 'const' qualifiers", followed by
"pointer mismatch for actual parameters" when trying to g_free or
g_memmove data fields from an "address" structure. address is defined in address.h as:
typedef struct _address {
address_type type; /* type of address */
int len; /* length of address, in bytes */
const guint8 *data; /* bytes that constitute address */
} address;
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-. I've found a reference to a similar situation, that claims this to be some sort
of VC6-specific behaviour, at:
http://lists.gnu.org/archive/html/bug-cvs/2004-04/msg00043.html
which was solved like this:
http://lists.gnu.org/archive/html/bug-cvs/2004-04/msg00110.html
but I don't really know how to apply this here. Can anybody help?
Regards,
Francisco
Powered by MHonArc 2.6.10