http://bugs.winehq.org/show_bug.cgi?id=16744
Summary: ole32/stg_prop.c: passing argument discards qualifiers from pointer target type Product: Wine Version: 1.1.12 Platform: Macintosh OS/Version: Linux Status: NEW Keywords: source Severity: minor Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_OLE32_ -DCOM_NO_WINDOWS_H -DENTRY_PREFIX=OLE32_ -DPROXY_CLSID=CLSID_PSFactoryBuffer -DREGISTER_PROXY_DLL -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wtype-limits -Wpointer-arith -g -O2 -o stg_prop.o stg_prop.c stg_prop.c: In function ‘PropertyStorage_DictionaryWriter’: stg_prop.c:1514: warning: passing argument 1 of ‘PropertyStorage_ByteSwapString’ discards qualifiers from pointer target type stg_prop.c:1516: warning: passing argument 1 of ‘PropertyStorage_ByteSwapString’ discards qualifiers from pointer target type
http://bugs.winehq.org/show_bug.cgi?id=16744
--- Comment #1 from Juan Lang juan_lang@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.
http://bugs.winehq.org/show_bug.cgi?id=16744
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX
--- Comment #2 from Juan Lang juan_lang@yahoo.com 2009-08-14 17:40:50 --- No one had any bright suggestions, so I think the warning should just be ignored. Marking WONTFIX.
http://bugs.winehq.org/show_bug.cgi?id=16744
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Juan Lang juan_lang@yahoo.com 2009-08-14 17:41:42 --- and closing.
http://bugs.winehq.org/show_bug.cgi?id=16744
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|WONTFIX |
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2009-08-15 03:17:37 --- You should make a copy, modifying it in place like this is ugly.
http://bugs.winehq.org/show_bug.cgi?id=16744
--- Comment #5 from Juan Lang juan_lang@yahoo.com 2009-08-20 13:07:12 --- Fixed by commit c664e9f4942a9fa5d31366aabfeb056861519aae.
http://bugs.winehq.org/show_bug.cgi?id=16744
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Component|build-env |-unknown Resolution| |FIXED
--- Comment #6 from Dmitry Timoshkov dmitry@codeweavers.com 2009-08-21 00:38:33 --- Fixed.
http://bugs.winehq.org/show_bug.cgi?id=16744
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org 2009-08-21 12:41:34 --- Closing bugs fixed in 1.1.28.
http://bugs.winehq.org/show_bug.cgi?id=16744
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|Macintosh |ppc32