[Bug 16744] ole32/stg_prop.c: passing argument discards qualifiers from pointer target type

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Jan 3 11:36:02 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=16744





--- Comment #1 from Juan Lang <juan_lang at yahoo.com>  2009-01-03 11:36:01 ---
Yep, those warnings are correct:  it's writing over a const pointer's referent.
 See the comments at lines 1511-1512:
        /* Rather than allocate a copy, I'll swap the string to little-endian
         * in-place, write it, then swap it back.

I don't think the prototype for dictionary_enumerate should be changed, as
overwriting the key of a value of a dictionary is generally a bad idea.  Since
it's being replaced with the original value by the time
PropertyStorage_DictionaryWriter returns, it's not dangerous in this case.

So I don't know what the best solution is:
1) Just cast key to a non-const pointer?  That might silence the warning.
2) Ignore the warning.
3) Allocate a copy of key to swap it.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list