diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 4003e692f11..5c70e0b28e9 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -2498,7 +2498,7 @@ static HRESULT WINAPI DP_IF_GetGroupName if( lpGData->name.u1.lpszShortNameA ) { - strcpy( ((BYTE*)lpName)+lpGData->name.dwSize, + strcpy( ((char*)lpName)+lpGData->name.dwSize, lpGData->name.u1.lpszShortNameA ); } else @@ -2508,7 +2508,7 @@ static HRESULT WINAPI DP_IF_GetGroupName if( lpGData->name.u1.lpszShortNameA ) { - strcpy( ((BYTE*)lpName)+lpGData->name.dwSize, + strcpy( ((char*)lpName)+lpGData->name.dwSize, lpGData->name.u2.lpszLongNameA ); } else @@ -2697,7 +2697,7 @@ static HRESULT WINAPI DP_IF_GetPlayerName if( lpPList->lpPData->name.u1.lpszShortNameA ) { - strcpy( ((BYTE*)lpName)+lpPList->lpPData->name.dwSize, + strcpy( ((char*)lpName)+lpPList->lpPData->name.dwSize, lpPList->lpPData->name.u1.lpszShortNameA ); } else @@ -2707,7 +2707,7 @@ static HRESULT WINAPI DP_IF_GetPlayerName if( lpPList->lpPData->name.u1.lpszShortNameA ) { - strcpy( ((BYTE*)lpName)+lpPList->lpPData->name.dwSize, + strcpy( ((char*)lpName)+lpPList->lpPData->name.dwSize, lpPList->lpPData->name.u2.lpszLongNameA ); } else diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index 78317e9ae9d..5371c634738 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -1488,11 +1488,11 @@ IDirectSoundCaptureBufferImpl_Start( break; } if (c == 0) { - ipDSC->device->pwave[0].lpData = ipDSC->device->buffer; + ipDSC->device->pwave[0].lpData = (LPSTR)ipDSC->device->buffer; ipDSC->device->pwave[0].dwBufferLength = This->notifies[0].dwOffset + 1; } else { - ipDSC->device->pwave[c].lpData = ipDSC->device->buffer + + ipDSC->device->pwave[c].lpData = (LPSTR)ipDSC->device->buffer + This->notifies[c-1].dwOffset + 1; ipDSC->device->pwave[c].dwBufferLength = This->notifies[c].dwOffset - @@ -1534,7 +1534,7 @@ IDirectSoundCaptureBufferImpl_Start( else ipDSC->device->pwave = HeapAlloc(GetProcessHeap(),0,sizeof(WAVEHDR)); - ipDSC->device->pwave[0].lpData = ipDSC->device->buffer; + ipDSC->device->pwave[0].lpData = (LPSTR)ipDSC->device->buffer; ipDSC->device->pwave[0].dwBufferLength = ipDSC->device->buflen; ipDSC->device->pwave[0].dwBytesRecorded = 0; ipDSC->device->pwave[0].dwUser = (DWORD)ipDSC; diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 05e336677c9..09907b90034 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -96,7 +96,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device) /* prepare fragment headers */ for (c=0; cpwave[c]->lpData = device->buffer + c*device->fraglen; + device->pwave[c]->lpData = (char*)device->buffer + c*device->fraglen; device->pwave[c]->dwBufferLength = device->fraglen; device->pwave[c]->dwUser = (DWORD)device; device->pwave[c]->dwFlags = 0; diff --git a/dlls/rpcrt4/cpsf.c b/dlls/rpcrt4/cpsf.c index 5f342f3a5cf..63ff8519534 100644 --- a/dlls/rpcrt4/cpsf.c +++ b/dlls/rpcrt4/cpsf.c @@ -183,11 +183,11 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll, if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0, KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) { if (name) - RegSetValueExA(key, NULL, 0, REG_SZ, name, strlen(name)); + RegSetValueExA(key, NULL, 0, REG_SZ, (LPBYTE)name, strlen(name)); if (RegCreateKeyExA(key, "ProxyStubClsid32", 0, NULL, 0, KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) { snprintf(module, sizeof(module), "{%s}", clsid); - RegSetValueExA(subkey, NULL, 0, REG_SZ, module, strlen(module)); + RegSetValueExA(subkey, NULL, 0, REG_SZ, (LPBYTE)module, strlen(module)); RegCloseKey(subkey); } RegCloseKey(key); @@ -205,7 +205,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll, KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) { if (RegCreateKeyExA(key, "InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) { - RegSetValueExA(subkey, NULL, 0, REG_SZ, module, strlen(module)); + RegSetValueExA(subkey, NULL, 0, REG_SZ, (LPBYTE)module, strlen(module)); RegCloseKey(subkey); } RegCloseKey(key); diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 2b0eb8434ef..658093d94f1 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -422,8 +422,8 @@ unsigned char *WINAPI NdrConformantStringMarshall(MIDL_STUB_MESSAGE *pStubMsg, assert(pFormat); if (*pFormat == RPC_FC_C_CSTRING) { - TRACE("string=%s\n", debugstr_a(pszMessage)); - len = strlen(pszMessage)+1; + TRACE("string=%s\n", debugstr_a((char*)pszMessage)); + len = strlen((char*)pszMessage)+1; esize = 1; } else if (*pFormat == RPC_FC_C_WSTRING) { @@ -470,8 +470,8 @@ void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg, assert(pFormat); if (*pFormat == RPC_FC_C_CSTRING) { /* we need 12 octets for the [maxlen, offset, len] DWORDS, + 1 octet for '\0' */ - TRACE("string=%s\n", debugstr_a(pMemory)); - pStubMsg->BufferLength += strlen(pMemory) + 13 + BUFFER_PARANOIA; + TRACE("string=%s\n", debugstr_a((char*)pMemory)); + pStubMsg->BufferLength += strlen((char*)pMemory) + 13 + BUFFER_PARANOIA; } else if (*pFormat == RPC_FC_C_WSTRING) { /* we need 12 octets for the [maxlen, offset, len] DWORDS, + 2 octets for L'\0' */ @@ -569,7 +569,7 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg pStubMsg->Buffer += len*esize; if (*pFormat == RPC_FC_C_CSTRING) { - TRACE("string=%s\n", debugstr_a(pMem)); + TRACE("string=%s\n", debugstr_a((char*)pMem)); } else if (*pFormat == RPC_FC_C_WSTRING) { TRACE("string=%s\n", debugstr_w((LPWSTR)pMem)); diff --git a/dlls/rpcrt4/rpc_epmap.c b/dlls/rpcrt4/rpc_epmap.c index 1d8eeb2b00a..f7d01a1a190 100644 --- a/dlls/rpcrt4/rpc_epmap.c +++ b/dlls/rpcrt4/rpc_epmap.c @@ -76,7 +76,7 @@ RPC_STATUS WINAPI RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bind unsigned long c; RPC_STATUS rslt = RPC_S_OK; - TRACE("(%p,%p,%p,%s)\n", IfSpec, BindingVector, UuidVector, debugstr_a(Annotation)); + TRACE("(%p,%p,%p,%s)\n", IfSpec, BindingVector, UuidVector, debugstr_a((char*)Annotation)); TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID)); for (c=0; cCount; c++) { RpcBinding* bind = (RpcBinding*)(BindingVector->BindingH[c]); diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 166296ab2bc..b33b50b07c8 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -727,14 +727,14 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExA( unsigned char *Protseq, UINT MaxCall { RpcServerProtseq* ps; - TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_a( Protseq ), MaxCalls, - debugstr_a( Endpoint ), SecurityDescriptor, + TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_a( (char*)Protseq ), MaxCalls, + debugstr_a( (char*)Endpoint ), SecurityDescriptor, lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); ps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcServerProtseq)); ps->MaxCalls = MaxCalls; - ps->Protseq = RPCRT4_strdupA(Protseq); - ps->Endpoint = RPCRT4_strdupA(Endpoint); + ps->Protseq = RPCRT4_strdupA((char*)Protseq); + ps->Endpoint = RPCRT4_strdupA((char*)Endpoint); return RPCRT4_use_protseq(ps); } @@ -764,7 +764,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExW( LPWSTR Protseq, UINT MaxCalls, LPWST */ RPC_STATUS WINAPI RpcServerUseProtseqA(unsigned char *Protseq, unsigned int MaxCalls, void *SecurityDescriptor) { - TRACE("(Protseq == %s, MaxCalls == %d, SecurityDescriptor == ^%p)\n", debugstr_a(Protseq), MaxCalls, SecurityDescriptor); + TRACE("(Protseq == %s, MaxCalls == %d, SecurityDescriptor == ^%p)\n", debugstr_a((char*)Protseq), MaxCalls, SecurityDescriptor); return RpcServerUseProtseqEpA(Protseq, MaxCalls, NULL, SecurityDescriptor); } diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index 9dcc9a10573..20f7e6f73f3 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -518,7 +518,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, unsigned char** StringUuid) if (!Uuid) Uuid = &uuid_nil; - sprintf(*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + sprintf( (char*)*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", Uuid->Data1, Uuid->Data2, Uuid->Data3, Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2], Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5], @@ -569,14 +569,13 @@ static const BYTE hex2bin[] = /*********************************************************************** * UuidFromStringA (RPCRT4.@) */ -RPC_STATUS WINAPI UuidFromStringA(unsigned char* str, UUID *uuid) +RPC_STATUS WINAPI UuidFromStringA(unsigned char* s, UUID *uuid) { - BYTE *s = (BYTE *)str; int i; if (!s) return UuidCreateNil( uuid ); - if (strlen(s) != 36) return RPC_S_INVALID_STRING_UUID; + if (strlen((char*)s) != 36) return RPC_S_INVALID_STRING_UUID; if ((s[8]!='-') || (s[13]!='-') || (s[18]!='-') || (s[23]!='-')) return RPC_S_INVALID_STRING_UUID; @@ -792,7 +791,7 @@ RPC_STATUS RPC_ENTRY DceErrorInqTextA (RPC_STATUS e, unsigned char *buffer) WCHAR bufferW [MAX_RPC_ERROR_TEXT]; if ((status = DceErrorInqTextW (e, bufferW)) == RPC_S_OK) { - if (!WideCharToMultiByte(CP_ACP, 0, bufferW, -1, buffer, MAX_RPC_ERROR_TEXT, + if (!WideCharToMultiByte(CP_ACP, 0, bufferW, -1, (LPSTR)buffer, MAX_RPC_ERROR_TEXT, NULL, NULL)) { ERR ("Failed to translate error");