Commit 4a5378ef authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix some gcc 4.0 warnings.

parent 6636d762
...@@ -2498,7 +2498,7 @@ static HRESULT WINAPI DP_IF_GetGroupName ...@@ -2498,7 +2498,7 @@ static HRESULT WINAPI DP_IF_GetGroupName
if( lpGData->name.u1.lpszShortNameA ) if( lpGData->name.u1.lpszShortNameA )
{ {
strcpy( ((BYTE*)lpName)+lpGData->name.dwSize, strcpy( ((char*)lpName)+lpGData->name.dwSize,
lpGData->name.u1.lpszShortNameA ); lpGData->name.u1.lpszShortNameA );
} }
else else
...@@ -2508,7 +2508,7 @@ static HRESULT WINAPI DP_IF_GetGroupName ...@@ -2508,7 +2508,7 @@ static HRESULT WINAPI DP_IF_GetGroupName
if( lpGData->name.u1.lpszShortNameA ) if( lpGData->name.u1.lpszShortNameA )
{ {
strcpy( ((BYTE*)lpName)+lpGData->name.dwSize, strcpy( ((char*)lpName)+lpGData->name.dwSize,
lpGData->name.u2.lpszLongNameA ); lpGData->name.u2.lpszLongNameA );
} }
else else
...@@ -2697,7 +2697,7 @@ static HRESULT WINAPI DP_IF_GetPlayerName ...@@ -2697,7 +2697,7 @@ static HRESULT WINAPI DP_IF_GetPlayerName
if( lpPList->lpPData->name.u1.lpszShortNameA ) 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 ); lpPList->lpPData->name.u1.lpszShortNameA );
} }
else else
...@@ -2707,7 +2707,7 @@ static HRESULT WINAPI DP_IF_GetPlayerName ...@@ -2707,7 +2707,7 @@ static HRESULT WINAPI DP_IF_GetPlayerName
if( lpPList->lpPData->name.u1.lpszShortNameA ) 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 ); lpPList->lpPData->name.u2.lpszLongNameA );
} }
else else
......
...@@ -1488,11 +1488,11 @@ IDirectSoundCaptureBufferImpl_Start( ...@@ -1488,11 +1488,11 @@ IDirectSoundCaptureBufferImpl_Start(
break; break;
} }
if (c == 0) { 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 = ipDSC->device->pwave[0].dwBufferLength =
This->notifies[0].dwOffset + 1; This->notifies[0].dwOffset + 1;
} else { } else {
ipDSC->device->pwave[c].lpData = ipDSC->device->buffer + ipDSC->device->pwave[c].lpData = (LPSTR)ipDSC->device->buffer +
This->notifies[c-1].dwOffset + 1; This->notifies[c-1].dwOffset + 1;
ipDSC->device->pwave[c].dwBufferLength = ipDSC->device->pwave[c].dwBufferLength =
This->notifies[c].dwOffset - This->notifies[c].dwOffset -
...@@ -1534,7 +1534,7 @@ IDirectSoundCaptureBufferImpl_Start( ...@@ -1534,7 +1534,7 @@ IDirectSoundCaptureBufferImpl_Start(
else else
ipDSC->device->pwave = HeapAlloc(GetProcessHeap(),0,sizeof(WAVEHDR)); 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].dwBufferLength = ipDSC->device->buflen;
ipDSC->device->pwave[0].dwBytesRecorded = 0; ipDSC->device->pwave[0].dwBytesRecorded = 0;
ipDSC->device->pwave[0].dwUser = (DWORD)ipDSC; ipDSC->device->pwave[0].dwUser = (DWORD)ipDSC;
......
...@@ -96,7 +96,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device) ...@@ -96,7 +96,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
/* prepare fragment headers */ /* prepare fragment headers */
for (c=0; c<DS_HEL_FRAGS; c++) { for (c=0; c<DS_HEL_FRAGS; c++) {
device->pwave[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]->dwBufferLength = device->fraglen;
device->pwave[c]->dwUser = (DWORD)device; device->pwave[c]->dwUser = (DWORD)device;
device->pwave[c]->dwFlags = 0; device->pwave[c]->dwFlags = 0;
......
...@@ -183,11 +183,11 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll, ...@@ -183,11 +183,11 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0, if (RegCreateKeyExA(HKEY_CLASSES_ROOT, keyname, 0, NULL, 0,
KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) { KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) {
if (name) 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, if (RegCreateKeyExA(key, "ProxyStubClsid32", 0, NULL, 0,
KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) { KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) {
snprintf(module, sizeof(module), "{%s}", clsid); 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(subkey);
} }
RegCloseKey(key); RegCloseKey(key);
...@@ -205,7 +205,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll, ...@@ -205,7 +205,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) { KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS) {
if (RegCreateKeyExA(key, "InProcServer32", 0, NULL, 0, if (RegCreateKeyExA(key, "InProcServer32", 0, NULL, 0,
KEY_WRITE, NULL, &subkey, NULL) == ERROR_SUCCESS) { 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(subkey);
} }
RegCloseKey(key); RegCloseKey(key);
......
...@@ -422,8 +422,8 @@ unsigned char *WINAPI NdrConformantStringMarshall(MIDL_STUB_MESSAGE *pStubMsg, ...@@ -422,8 +422,8 @@ unsigned char *WINAPI NdrConformantStringMarshall(MIDL_STUB_MESSAGE *pStubMsg,
assert(pFormat); assert(pFormat);
if (*pFormat == RPC_FC_C_CSTRING) { if (*pFormat == RPC_FC_C_CSTRING) {
TRACE("string=%s\n", debugstr_a(pszMessage)); TRACE("string=%s\n", debugstr_a((char*)pszMessage));
len = strlen(pszMessage)+1; len = strlen((char*)pszMessage)+1;
esize = 1; esize = 1;
} }
else if (*pFormat == RPC_FC_C_WSTRING) { else if (*pFormat == RPC_FC_C_WSTRING) {
...@@ -470,8 +470,8 @@ void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg, ...@@ -470,8 +470,8 @@ void WINAPI NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
assert(pFormat); assert(pFormat);
if (*pFormat == RPC_FC_C_CSTRING) { if (*pFormat == RPC_FC_C_CSTRING) {
/* we need 12 octets for the [maxlen, offset, len] DWORDS, + 1 octet for '\0' */ /* we need 12 octets for the [maxlen, offset, len] DWORDS, + 1 octet for '\0' */
TRACE("string=%s\n", debugstr_a(pMemory)); TRACE("string=%s\n", debugstr_a((char*)pMemory));
pStubMsg->BufferLength += strlen(pMemory) + 13 + BUFFER_PARANOIA; pStubMsg->BufferLength += strlen((char*)pMemory) + 13 + BUFFER_PARANOIA;
} }
else if (*pFormat == RPC_FC_C_WSTRING) { else if (*pFormat == RPC_FC_C_WSTRING) {
/* we need 12 octets for the [maxlen, offset, len] DWORDS, + 2 octets for L'\0' */ /* 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 ...@@ -569,7 +569,7 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
pStubMsg->Buffer += len*esize; pStubMsg->Buffer += len*esize;
if (*pFormat == RPC_FC_C_CSTRING) { 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) { else if (*pFormat == RPC_FC_C_WSTRING) {
TRACE("string=%s\n", debugstr_w((LPWSTR)pMem)); TRACE("string=%s\n", debugstr_w((LPWSTR)pMem));
......
...@@ -76,7 +76,7 @@ RPC_STATUS WINAPI RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bind ...@@ -76,7 +76,7 @@ RPC_STATUS WINAPI RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bind
unsigned long c; unsigned long c;
RPC_STATUS rslt = RPC_S_OK; 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)); TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID));
for (c=0; c<BindingVector->Count; c++) { for (c=0; c<BindingVector->Count; c++) {
RpcBinding* bind = (RpcBinding*)(BindingVector->BindingH[c]); RpcBinding* bind = (RpcBinding*)(BindingVector->BindingH[c]);
......
...@@ -727,14 +727,14 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExA( unsigned char *Protseq, UINT MaxCall ...@@ -727,14 +727,14 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExA( unsigned char *Protseq, UINT MaxCall
{ {
RpcServerProtseq* ps; RpcServerProtseq* ps;
TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_a( Protseq ), MaxCalls, TRACE("(%s,%u,%s,%p,{%u,%lu,%lu})\n", debugstr_a( (char*)Protseq ), MaxCalls,
debugstr_a( Endpoint ), SecurityDescriptor, debugstr_a( (char*)Endpoint ), SecurityDescriptor,
lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags ); lpPolicy->Length, lpPolicy->EndpointFlags, lpPolicy->NICFlags );
ps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcServerProtseq)); ps = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcServerProtseq));
ps->MaxCalls = MaxCalls; ps->MaxCalls = MaxCalls;
ps->Protseq = RPCRT4_strdupA(Protseq); ps->Protseq = RPCRT4_strdupA((char*)Protseq);
ps->Endpoint = RPCRT4_strdupA(Endpoint); ps->Endpoint = RPCRT4_strdupA((char*)Endpoint);
return RPCRT4_use_protseq(ps); return RPCRT4_use_protseq(ps);
} }
...@@ -764,7 +764,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExW( LPWSTR Protseq, UINT MaxCalls, LPWST ...@@ -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) 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); return RpcServerUseProtseqEpA(Protseq, MaxCalls, NULL, SecurityDescriptor);
} }
......
...@@ -518,7 +518,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, unsigned char** StringUuid) ...@@ -518,7 +518,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, unsigned char** StringUuid)
if (!Uuid) Uuid = &uuid_nil; 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->Data1, Uuid->Data2, Uuid->Data3,
Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2], Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5], Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
...@@ -569,14 +569,13 @@ static const BYTE hex2bin[] = ...@@ -569,14 +569,13 @@ static const BYTE hex2bin[] =
/*********************************************************************** /***********************************************************************
* UuidFromStringA (RPCRT4.@) * 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; int i;
if (!s) return UuidCreateNil( uuid ); 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]!='-')) if ((s[8]!='-') || (s[13]!='-') || (s[18]!='-') || (s[23]!='-'))
return RPC_S_INVALID_STRING_UUID; return RPC_S_INVALID_STRING_UUID;
...@@ -792,7 +791,7 @@ RPC_STATUS RPC_ENTRY DceErrorInqTextA (RPC_STATUS e, unsigned char *buffer) ...@@ -792,7 +791,7 @@ RPC_STATUS RPC_ENTRY DceErrorInqTextA (RPC_STATUS e, unsigned char *buffer)
WCHAR bufferW [MAX_RPC_ERROR_TEXT]; WCHAR bufferW [MAX_RPC_ERROR_TEXT];
if ((status = DceErrorInqTextW (e, bufferW)) == RPC_S_OK) 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)) NULL, NULL))
{ {
ERR ("Failed to translate error"); ERR ("Failed to translate error");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment