Wireshark-dev: Re: [Wireshark-dev] Memory Question
From: Peter Harris <wireshark@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Feb 2009 10:33:55 -0500
On Thu, Feb 26, 2009 at 10:15 AM, wrote:
> So i tried doing:
>
> const BYTE* target;
> tvb_memcpy(tvb, target, offset, data_length);
>
> and i get the error:
> packet-icom.c
> packet-icom.c(246) : error C2220: warning treated as error - no 'object' file ge
> nerated
> packet-icom.c(246) : warning C4090: 'function' : different 'const' qualifiers
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
> \cl.EXE"' : return code '0x2'
> Stop.
>
> can someone please clarify this?

You're trying to write through a pointer that you have promised will
be used only for reads ('const').

Peter Harris