M
Martijn
Hi,
I recently updated my version of gcc (to gcc version 3.4.2
(mingw-special) ), and I get a warning I am not too sure about how to best
solve:
warning: use of cast expressions as lvalues is deprecated
The code that invokes this warning has to do with PIDLs (pointer to item id
list, which are a Windows thing and not too important really). The problem
is that I have a pointer to a structure (typedef'd to ITEMIDLIST) and in
order to access some data I have to move over a certain amount of bytes (the
pointer really points to an array with arbitrary-sized memory blocks, and
the structure is just a way to interface those blocks), so this is what I
did:
ITEMIDLIST* pidl;
int offset;
...
(char*)pidl += offset;
What can I do to fix the warning? Preferebly without the use of an extra
variable (e.g. a char*).
Thanks,
I recently updated my version of gcc (to gcc version 3.4.2
(mingw-special) ), and I get a warning I am not too sure about how to best
solve:
warning: use of cast expressions as lvalues is deprecated
The code that invokes this warning has to do with PIDLs (pointer to item id
list, which are a Windows thing and not too important really). The problem
is that I have a pointer to a structure (typedef'd to ITEMIDLIST) and in
order to access some data I have to move over a certain amount of bytes (the
pointer really points to an array with arbitrary-sized memory blocks, and
the structure is just a way to interface those blocks), so this is what I
did:
ITEMIDLIST* pidl;
int offset;
...
(char*)pidl += offset;
What can I do to fix the warning? Preferebly without the use of an extra
variable (e.g. a char*).
Thanks,