http://bugs.winehq.org/show_bug.cgi?id=28452
Summary: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] Product: Wine Version: 1.3.28 Platform: x86 URL: http://llvm.org/viewvc/llvm-project?view=rev&revision= 133155 OS/Version: Linux Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Created an attachment (id=36482) --> (http://bugs.winehq.org/attachment.cgi?id=36482) full clang make log
A new warning in Clang, see http://llvm.org/viewvc/llvm-project?view=rev&revision=133155.
There are 13 occurrences in Wine. According to AJ on irc, most look legitimate: make[1]: Entering directory `/home/austin/wine-git/dlls/dmband' band.c:176:68: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~
make[1]: Entering directory `/home/austin/wine-git/dlls/dmcompos' chordmap.c:166:68: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~ audiopath.c:276:68: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~ graph.c:241:68: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~ segment.c:567:68: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~ script.c:245:70: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~ make[1]: Entering directory `/home/austin/wine-git/dlls/dmstyle' style.c:249:68: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~ make[1]: Entering directory `/home/austin/wine-git/dlls/dmusic' collection.c:213:68: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~ make[1]: Entering directory `/home/austin/wine-git/dlls/dswave' clang -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wwrite-strings -Wpointer-arith -g -O2 -o dswave.o dswave.c dswave.c:365:68: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); ~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~~~
make[1]: Entering directory `/home/austin/wine-git/dlls/msvcrt' locale.c:103:51: warning: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memcpy(name, _country_synonyms[i+1], sizeof(_country_synonyms[i+1])); ~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~
winhttp.c:662:89: warning: argument to 'sizeof' in 'memcmp' call is the same expression as the source; did you mean to dereference it? [-Wsizeof-pointer-memaccess] ok(memcmp(buffer, reverse ? test_flag_coalesce_reverse : test_flag_coalesce, sizeof(reverse ? test_flag_coalesce_reverse : test_flag_coalesce)) == 0, "WinHttpQueryHeaders returned incorrect string.\n"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ winhttp.c:686:101: warning: argument to 'sizeof' in 'memcmp' call is the same expression as the source; did you mean to dereference it? [-Wsizeof-pointer-memaccess] ok(memcmp(buffer, reverse ? test_flag_coalesce_comma_reverse : test_flag_coalesce_comma, sizeof(reverse ? test_flag_coalesce_comma_reverse : test_flag_coalesce_comma)) == 0,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ winhttp.c:712:109: warning: argument to 'sizeof' in 'memcmp' call is the same expression as the source; did you mean to dereference it? [-Wsizeof-pointer-memaccess] ok(memcmp(buffer, reverse ? test_flag_coalesce_semicolon_reverse : test_flag_coalesce_semicolon, sizeof(reverse ? test_flag_coalesce_semicolon_reverse : test_flag_coalesce_semicolon)) == 0,
http://bugs.winehq.org/show_bug.cgi?id=28452
--- Comment #1 from Austin English austinenglish@gmail.com 2011-10-17 17:44:26 CDT --- The msvcrt/locale.c warning is fixed by 6ca6464cf3c175baa698abffaedce5aa9b6df7a2. The winhttp/winhttp.c warnings are fixed by 8648c1314011afd6300f97f9671af6797a205a02.
http://bugs.winehq.org/show_bug.cgi?id=28452
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |2a55b09bedc6010c326aa1663f0 | |4dda674b89763 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #2 from Austin English austinenglish@gmail.com 2011-10-18 14:08:37 CDT --- The remainder were fixed by http://source.winehq.org/git/wine.git/commitdiff/2a55b09bedc6010c326aa1663f0...
Go Marcus!
http://bugs.winehq.org/show_bug.cgi?id=28452
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2011-10-21 13:51:00 CDT --- Closing bugs fixed in 1.3.31.
https://bugs.winehq.org/show_bug.cgi?id=28452
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Component|-unknown |directx-dmusic