From: Bruno Jesus <00cpxxx@gmail.com> Subject: wsock32: Clarify cast operation (PVS-Studio) Message-Id: Date: Fri, 24 Oct 2014 02:10:45 -0200 Partially fix https://bugs.winehq.org/show_bug.cgi?id=37123 diff --git a/dlls/wsock32/protocol.c b/dlls/wsock32/protocol.c index 416613a..16109e3 100644 --- a/dlls/wsock32/protocol.c +++ b/dlls/wsock32/protocol.c @@ -191,7 +191,7 @@ INT WINAPI EnumProtocolsW(LPINT protocols, LPVOID buffer, LPDWORD buflen) pi[i].dwMessageSize = wsabuf[i].dwMessageSize; memcpy((char *)buffer + string_offset, wsabuf[i].szProtocol, string_size); - pi[i].lpProtocol = (WCHAR *)(char *)buffer + string_offset; + pi[i].lpProtocol = (WCHAR *)((char *)buffer + string_offset); string_offset += string_size; } HeapFree(GetProcessHeap(), 0, wsabuf);