rpcrt4: Win64 printf format warning fixes.

This commit is contained in:
Michael Stefaniuc 2006-11-09 23:04:48 +01:00 committed by Alexandre Julliard
parent 718f3c3505
commit de21efbadd
14 changed files with 74 additions and 74 deletions

View File

@ -1,4 +1,4 @@
EXTRADEFS = -D_RPCRT4_ -DCOM_NO_WINDOWS_H -DMSWMSG -DWINE_NO_LONG_AS_INT
EXTRADEFS = -D_RPCRT4_ -DCOM_NO_WINDOWS_H -DMSWMSG
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@

View File

@ -101,7 +101,7 @@ static HRESULT WINAPI ObjectStubless(DWORD index)
PFORMAT_STRING fs = This->stubless->ProcFormatString + This->stubless->FormatStringOffset[index];
unsigned bytes = *(const WORD*)(fs+8) - STACK_ADJUST;
TRACE("(%p)->(%ld)([%d bytes]) ret=%08lx\n", iface, index, bytes, *(DWORD*)(args+bytes));
TRACE("(%p)->(%d)([%d bytes]) ret=%08x\n", iface, index, bytes, *(DWORD*)(args+bytes));
return NdrClientCall2(This->stubless->pStubDesc, fs, args);
}
@ -420,7 +420,7 @@ void WINAPI NdrProxyFreeBuffer(void *This,
*/
HRESULT WINAPI NdrProxyErrorHandler(DWORD dwExceptionCode)
{
WARN("(0x%08lx): a proxy call failed\n", dwExceptionCode);
WARN("(0x%08x): a proxy call failed\n", dwExceptionCode);
if (FAILED(dwExceptionCode))
return dwExceptionCode;

View File

@ -201,10 +201,10 @@ static void fill_table(IUnknownVtbl *vtbl, DWORD num)
void create_delegating_vtbl(DWORD num_methods)
{
TRACE("%ld\n", num_methods);
TRACE("%d\n", num_methods);
if(num_methods <= 3)
{
ERR("should have more than %ld methods\n", num_methods);
ERR("should have more than %d methods\n", num_methods);
return;
}
@ -243,7 +243,7 @@ static void release_delegating_vtbl(IUnknownVtbl *vtbl)
EnterCriticalSection(&delegating_vtbl_section);
table->ref--;
TRACE("ref now %ld\n", table->ref);
TRACE("ref now %d\n", table->ref);
if(table->ref == 0 && table != current_vtbl.table)
{
TRACE("... and we're not current so free'ing\n");
@ -423,7 +423,7 @@ HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface,
__EXCEPT(stub_filter)
{
DWORD dwExceptionCode = GetExceptionCode();
WARN("a stub call failed with exception 0x%08lx (%ld)\n", dwExceptionCode, dwExceptionCode);
WARN("a stub call failed with exception 0x%08x (%d)\n", dwExceptionCode, dwExceptionCode);
if (FAILED(dwExceptionCode))
hr = dwExceptionCode;
else

View File

@ -131,7 +131,7 @@ unsigned char* WINAPI NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_M
*/
unsigned char *WINAPI NdrGetBuffer(MIDL_STUB_MESSAGE *stubmsg, ULONG buflen, RPC_BINDING_HANDLE handle)
{
TRACE("(stubmsg == ^%p, buflen == %lu, handle == %p): wild guess.\n", stubmsg, buflen, handle);
TRACE("(stubmsg == ^%p, buflen == %u, handle == %p): wild guess.\n", stubmsg, buflen, handle);
assert( stubmsg && stubmsg->RpcMsg );

View File

@ -35,7 +35,7 @@ PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(ULONG NumberOfPointers,
ULONG NumberOfBuckets;
PFULL_PTR_XLAT_TABLES pXlatTables = HeapAlloc(GetProcessHeap(), 0, sizeof(*pXlatTables));
TRACE("(%ld, %d)\n", NumberOfPointers, XlatSide);
TRACE("(%d, %d)\n", NumberOfPointers, XlatSide);
if (!NumberOfPointers) NumberOfPointers = 512;
NumberOfBuckets = ((NumberOfPointers + 3) & ~3) - 1;
@ -48,7 +48,7 @@ PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(ULONG NumberOfPointers,
sizeof(unsigned char) * NumberOfPointers);
pXlatTables->RefIdToPointer.NumberOfEntries = NumberOfPointers;
TRACE("NumberOfBuckets = %ld\n", NumberOfBuckets);
TRACE("NumberOfBuckets = %d\n", NumberOfBuckets);
pXlatTables->PointerToRefId.XlatTable =
HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(PFULL_PTR_TO_REFID_ELEMENT) * NumberOfBuckets);
@ -144,7 +144,7 @@ int WINAPI NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
ULONG RefId, unsigned char QueryType,
void **ppPointer)
{
TRACE("(%p, 0x%lx, %d, %p)\n", pXlatTables, RefId, QueryType, ppPointer);
TRACE("(%p, 0x%x, %d, %p)\n", pXlatTables, RefId, QueryType, ppPointer);
expand_pointer_table_if_necessary(pXlatTables, RefId);
@ -174,7 +174,7 @@ void WINAPI NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES pXlatTables,
int i;
PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
TRACE("(%p, 0x%lx, %p)\n", pXlatTables, RefId, pPointer);
TRACE("(%p, 0x%x, %p)\n", pXlatTables, RefId, pPointer);
/* simple hashing algorithm, don't know whether it matches native */
for (i = 0; i < sizeof(pPointer); i++)

View File

@ -105,7 +105,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
#define ALIGN_POINTER(_Ptr, _Align) _Ptr = ALIGNED_POINTER(_Ptr, _Align)
#define STD_OVERFLOW_CHECK(_Msg) do { \
TRACE("buffer=%d/%ld\n", _Msg->Buffer - (unsigned char *)_Msg->RpcMsg->Buffer, _Msg->BufferLength); \
TRACE("buffer=%d/%d\n", _Msg->Buffer - (unsigned char *)_Msg->RpcMsg->Buffer, _Msg->BufferLength); \
if (_Msg->Buffer > (unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength) \
ERR("buffer overflow %d bytes\n", _Msg->Buffer - ((unsigned char *)_Msg->RpcMsg->Buffer + _Msg->BufferLength)); \
} while (0)
@ -344,15 +344,15 @@ static inline PFORMAT_STRING ReadVariance(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_S
ALIGN_POINTER(pStubMsg->Buffer, 4);
pStubMsg->Offset = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer);
pStubMsg->Buffer += 4;
TRACE("offset is %ld\n", pStubMsg->Offset);
TRACE("offset is %d\n", pStubMsg->Offset);
pStubMsg->ActualCount = NDR_LOCAL_UINT32_READ(pStubMsg->Buffer);
pStubMsg->Buffer += 4;
TRACE("variance is %ld\n", pStubMsg->ActualCount);
TRACE("variance is %d\n", pStubMsg->ActualCount);
if ((pStubMsg->ActualCount > MaxValue) ||
(pStubMsg->ActualCount + pStubMsg->Offset > MaxValue))
{
ERR("invalid array bound(s): ActualCount = %ld, Offset = %ld, MaxValue = %ld\n",
ERR("invalid array bound(s): ActualCount = %d, Offset = %d, MaxValue = %d\n",
pStubMsg->ActualCount, pStubMsg->Offset, MaxValue);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
@ -433,7 +433,7 @@ PFORMAT_STRING ComputeConformanceOrVariance(
break;
case RPC_FC_CONSTANT_CONFORMANCE:
data = ofs | ((DWORD)pFormat[1] << 16);
TRACE("constant conformance, val=%ld\n", data);
TRACE("constant conformance, val=%d\n", data);
*pCount = data;
goto finish_conf;
case RPC_FC_TOP_LEVEL_MULTID_CONFORMANCE:
@ -497,7 +497,7 @@ PFORMAT_STRING ComputeConformanceOrVariance(
FIXME("unknown conformance data type %x\n", dtype);
goto done_conf_grab;
}
TRACE("dereferenced data type %x at %p, got %ld\n", dtype, ptr, data);
TRACE("dereferenced data type %x at %p, got %d\n", dtype, ptr, data);
done_conf_grab:
switch (pFormat[1]) {
@ -669,7 +669,7 @@ ULONG WINAPI NdrConformantStringMemorySize( PMIDL_STUB_MESSAGE pStubMsg,
FIXME("sized string format=%d\n", pFormat[1]);
}
TRACE(" --> %lu\n", rslt);
TRACE(" --> %u\n", rslt);
return rslt;
}
@ -703,14 +703,14 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
/* strings must always have null terminating bytes */
if (bufsize < esize)
{
ERR("invalid string length of %ld\n", pStubMsg->ActualCount);
ERR("invalid string length of %d\n", pStubMsg->ActualCount);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
for (i = bufsize - esize; i < bufsize; i++)
if (pStubMsg->Buffer[i] != 0)
{
ERR("string not null-terminated at byte position %ld, data is 0x%x\n",
ERR("string not null-terminated at byte position %d, data is 0x%x\n",
i, pStubMsg->Buffer[i]);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
@ -826,13 +826,13 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
else
pointer_needs_marshaling = 0;
pointer_id = (ULONG)Pointer;
TRACE("writing 0x%08lx to buffer\n", pointer_id);
TRACE("writing 0x%08x to buffer\n", pointer_id);
NDR_LOCAL_UINT32_WRITE(Buffer, pointer_id);
break;
case RPC_FC_FP:
pointer_needs_marshaling = !NdrFullPointerQueryPointer(
pStubMsg->FullPtrXlatTables, Pointer, 1, &pointer_id);
TRACE("writing 0x%08lx to buffer\n", pointer_id);
TRACE("writing 0x%08x to buffer\n", pointer_id);
NDR_LOCAL_UINT32_WRITE(Buffer, pointer_id);
break;
default:
@ -883,7 +883,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
break;
case RPC_FC_UP: /* unique pointer */
pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08lx\n", pointer_id);
TRACE("pointer_id is 0x%08x\n", pointer_id);
if (pointer_id)
pointer_needs_unmarshaling = 1;
else {
@ -893,7 +893,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
break;
case RPC_FC_OP: /* object pointer - we must free data before overwriting it */
pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08lx\n", pointer_id);
TRACE("pointer_id is 0x%08x\n", pointer_id);
if (!fMustAlloc && *pPointer)
{
FIXME("free object pointer %p\n", *pPointer);
@ -906,7 +906,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
break;
case RPC_FC_FP:
pointer_id = NDR_LOCAL_UINT32_READ(Buffer);
TRACE("pointer_id is 0x%08lx\n", pointer_id);
TRACE("pointer_id is 0x%08x\n", pointer_id);
pointer_needs_unmarshaling = !NdrFullPointerQueryRefId(
pStubMsg->FullPtrXlatTables, pointer_id, 1, (void **)pPointer);
break;
@ -1720,7 +1720,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
case RPC_FC_LONG:
case RPC_FC_ULONG:
case RPC_FC_ENUM32:
TRACE("long=%ld <= %p\n", *(DWORD*)pMemory, pMemory);
TRACE("long=%d <= %p\n", *(DWORD*)pMemory, pMemory);
memcpy(pStubMsg->Buffer, pMemory, 4);
pStubMsg->Buffer += 4;
pMemory += 4;
@ -1807,7 +1807,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
case RPC_FC_ULONG:
case RPC_FC_ENUM32:
memcpy(pMemory, pStubMsg->Buffer, 4);
TRACE("long=%ld => %p\n", *(DWORD*)pMemory, pMemory);
TRACE("long=%d => %p\n", *(DWORD*)pMemory, pMemory);
pStubMsg->Buffer += 4;
pMemory += 4;
break;
@ -2551,7 +2551,7 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
variance_present = IsConformanceOrVariancePresent(pFormat);
pFormat = ComputeVariance(pStubMsg, pMemory, pFormat, pStubMsg->MaxCount);
TRACE("variance = %ld\n", pStubMsg->ActualCount);
TRACE("variance = %d\n", pStubMsg->ActualCount);
WriteConformance(pStubMsg);
if (variance_present)
@ -2651,7 +2651,7 @@ void WINAPI NdrComplexArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
variance_present = IsConformanceOrVariancePresent(pFormat);
pFormat = ComputeVariance(pStubMsg, pMemory, pFormat, pStubMsg->MaxCount);
TRACE("variance = %ld\n", pStubMsg->ActualCount);
TRACE("variance = %d\n", pStubMsg->ActualCount);
if (variance_present)
SizeVariance(pStubMsg);
@ -2735,7 +2735,7 @@ void WINAPI NdrComplexArrayFree(PMIDL_STUB_MESSAGE pStubMsg,
TRACE("conformance = %ld\n", pStubMsg->MaxCount);
pFormat = ComputeVariance(pStubMsg, pMemory, pFormat, pStubMsg->MaxCount);
TRACE("variance = %ld\n", pStubMsg->ActualCount);
TRACE("variance = %d\n", pStubMsg->ActualCount);
count = pStubMsg->ActualCount;
for (i = 0; i < count; i++)
@ -2844,7 +2844,7 @@ void WINAPI NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
ALIGN_LENGTH(pStubMsg->BufferLength, (flags & 0xf) + 1);
if (bufsize) {
TRACE("size=%ld\n", bufsize);
TRACE("size=%d\n", bufsize);
pStubMsg->BufferLength += bufsize;
return;
}
@ -2927,7 +2927,7 @@ void WINAPI NdrConvert( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat )
*/
void WINAPI NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, LONG NumberParams )
{
FIXME("(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %ld): stub.\n",
FIXME("(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %d): stub.\n",
pStubMsg, pFormat, NumberParams);
/* FIXME: since this stub doesn't do any converting, the proper behavior
is to raise an exception */
@ -3279,14 +3279,14 @@ unsigned char * WINAPI NdrConformantVaryingStructUnmarshall(PMIDL_STUB_MESSAGE
/* strings must always have null terminating bytes */
if (bufsize < esize)
{
ERR("invalid string length of %ld\n", pStubMsg->ActualCount);
ERR("invalid string length of %d\n", pStubMsg->ActualCount);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
}
for (i = bufsize - esize; i < bufsize; i++)
if (pStubMsg->Buffer[i] != 0)
{
ERR("string not null-terminated at byte position %ld, data is 0x%x\n",
ERR("string not null-terminated at byte position %d, data is 0x%x\n",
i, pStubMsg->Buffer[i]);
RpcRaiseException(RPC_S_INVALID_BOUND);
return NULL;
@ -4333,7 +4333,7 @@ ULONG WINAPI NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
pFormat++;
/* Unmarshall discriminant */
discriminant = unmarshall_discriminant(pStubMsg, &pFormat);
TRACE("unmarshalled discriminant 0x%lx\n", discriminant);
TRACE("unmarshalled discriminant 0x%x\n", discriminant);
pFormat += *(const SHORT*)pFormat;
@ -4533,7 +4533,7 @@ static unsigned char *WINAPI NdrBaseTypeMarshall(
ALIGN_POINTER(pStubMsg->Buffer, sizeof(ULONG));
*(ULONG *)pStubMsg->Buffer = *(ULONG *)pMemory;
pStubMsg->Buffer += sizeof(ULONG);
TRACE("value: 0x%08lx\n", *(ULONG *)pMemory);
TRACE("value: 0x%08x\n", *(ULONG *)pMemory);
break;
case RPC_FC_FLOAT:
ALIGN_POINTER(pStubMsg->Buffer, sizeof(float));
@ -4609,7 +4609,7 @@ static unsigned char *WINAPI NdrBaseTypeUnmarshall(
case RPC_FC_ERROR_STATUS_T:
case RPC_FC_ENUM32:
BASE_TYPE_UNMARSHALL(ULONG);
TRACE("value: 0x%08lx\n", **(ULONG **)ppMemory);
TRACE("value: 0x%08x\n", **(ULONG **)ppMemory);
break;
case RPC_FC_FLOAT:
BASE_TYPE_UNMARSHALL(float);
@ -4967,7 +4967,7 @@ void WINAPI NDRCContextUnmarshall(NDR_CCONTEXT *CContext,
{
UINT r;
TRACE("*%p=(%p) %p %p %08lx\n",
TRACE("*%p=(%p) %p %p %08x\n",
CContext, *CContext, hBinding, pBuff, DataRepresentation);
EnterCriticalSection(&ndr_context_cs);
@ -4998,14 +4998,14 @@ void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding,
NDR_RUNDOWN userRunDownIn,
void *CtxGuard, ULONG Flags)
{
FIXME("(%p %p %p %p %p %lu): stub\n",
FIXME("(%p %p %p %p %p %u): stub\n",
hBinding, CContext, pBuff, userRunDownIn, CtxGuard, Flags);
}
NDR_SCONTEXT WINAPI NDRSContextUnmarshall(void *pBuff,
ULONG DataRepresentation)
{
FIXME("(%p %08lx): stub\n", pBuff, DataRepresentation);
FIXME("(%p %08x): stub\n", pBuff, DataRepresentation);
return NULL;
}
@ -5013,7 +5013,7 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshallEx(RPC_BINDING_HANDLE hBinding,
void *pBuff,
ULONG DataRepresentation)
{
FIXME("(%p %p %08lx): stub\n", hBinding, pBuff, DataRepresentation);
FIXME("(%p %p %08x): stub\n", hBinding, pBuff, DataRepresentation);
return NULL;
}
@ -5022,7 +5022,7 @@ NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding,
ULONG DataRepresentation,
void *CtxGuard, ULONG Flags)
{
FIXME("(%p %p %08lx %p %lu): stub\n",
FIXME("(%p %p %08x %p %u): stub\n",
hBinding, pBuff, DataRepresentation, CtxGuard, Flags);
return NULL;
}

View File

@ -112,7 +112,7 @@ static ULONG WINAPI RpcStream_Release(LPSTREAM iface)
{
RpcStreamImpl *This = (RpcStreamImpl *)iface;
if (!--(This->RefCount)) {
TRACE("size=%ld\n", *This->size);
TRACE("size=%d\n", *This->size);
This->pMsg->Buffer = (unsigned char*)This->data + *This->size;
HeapFree(GetProcessHeap(),0,This);
return 0;
@ -219,7 +219,7 @@ static LPSTREAM RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init)
This->data = (char*)(This->size + 1);
This->pos = 0;
if (init) *This->size = 0;
TRACE("init size=%ld\n", *This->size);
TRACE("init size=%d\n", *This->size);
return (LPSTREAM)This;
}
@ -314,7 +314,7 @@ void WINAPI NdrInterfacePointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
hr = COM_GetMarshalSizeMax(&size, riid, (LPUNKNOWN)pMemory,
pStubMsg->dwDestContext, pStubMsg->pvDestContext,
MSHLFLAGS_NORMAL);
TRACE("size=%ld\n", size);
TRACE("size=%d\n", size);
pStubMsg->BufferLength += sizeof(DWORD) + size;
}

View File

@ -785,7 +785,7 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
/* Later NDR language versions probably won't be backwards compatible */
if (pStubDesc->Version > 0x50002)
{
FIXME("Incompatible stub description version: 0x%lx\n", pStubDesc->Version);
FIXME("Incompatible stub description version: 0x%x\n", pStubDesc->Version);
RpcRaiseException(RPC_X_WRONG_STUB_VERSION);
}
@ -819,7 +819,7 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
NdrClientInitializeNew(&rpcMsg, &stubMsg, pStubDesc, procedure_number);
TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
TRACE("MIDL stub version = 0x%lx\n", pStubDesc->MIDLVersion);
TRACE("MIDL stub version = 0x%x\n", pStubDesc->MIDLVersion);
/* needed for conformance of top-level objects */
#ifdef __i386__
@ -1127,7 +1127,7 @@ LONG WINAPI NdrStubCall2(
/* Later NDR language versions probably won't be backwards compatible */
if (pStubDesc->Version > 0x50002)
{
FIXME("Incompatible stub description version: 0x%lx\n", pStubDesc->Version);
FIXME("Incompatible stub description version: 0x%x\n", pStubDesc->Version);
RpcRaiseException(RPC_X_WRONG_STUB_VERSION);
}

View File

@ -1063,7 +1063,7 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName,
r = EnumerateSecurityPackagesA(&package_count, &packages);
if (r != SEC_E_OK)
{
ERR("EnumerateSecurityPackagesA failed with error 0x%08lx\n", r);
ERR("EnumerateSecurityPackagesA failed with error 0x%08x\n", r);
return RPC_S_SEC_PKG_ERROR;
}
@ -1093,7 +1093,7 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName,
}
else
{
ERR("AcquireCredentialsHandleA failed with error 0x%08lx\n", r);
ERR("AcquireCredentialsHandleA failed with error 0x%08x\n", r);
return RPC_S_SEC_PKG_ERROR;
}
}
@ -1135,7 +1135,7 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
r = EnumerateSecurityPackagesW(&package_count, &packages);
if (r != SEC_E_OK)
{
ERR("EnumerateSecurityPackagesA failed with error 0x%08lx\n", r);
ERR("EnumerateSecurityPackagesA failed with error 0x%08x\n", r);
return RPC_S_SEC_PKG_ERROR;
}
@ -1165,7 +1165,7 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
}
else
{
ERR("AcquireCredentialsHandleA failed with error 0x%08lx\n", r);
ERR("AcquireCredentialsHandleA failed with error 0x%08x\n", r);
return RPC_S_SEC_PKG_ERROR;
}
}
@ -1199,6 +1199,6 @@ RpcBindingSetAuthInfoW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, un
*/
RPC_STATUS WINAPI RpcBindingSetOption(RPC_BINDING_HANDLE BindingHandle, ULONG Option, ULONG OptionValue)
{
FIXME("(%p, %ld, %ld): stub\n", BindingHandle, Option, OptionValue);
FIXME("(%p, %d, %d): stub\n", BindingHandle, Option, OptionValue);
return RPC_S_OK;
}

View File

@ -367,7 +367,7 @@ static void RPCRT4_AuthNegotiate(RpcConnection *conn, SecBuffer *out)
ISC_REQ_DELEGATE, 0, SECURITY_NETWORK_DREP,
NULL, 0, &conn->ctx, &out_desc, &conn->attr, &conn->exp);
TRACE("r = %08lx cbBuffer = %ld attr = %08lx\n", r, out->cbBuffer, conn->attr);
TRACE("r = %08x cbBuffer = %ld attr = %08x\n", r, out->cbBuffer, conn->attr);
}
/***********************************************************************
@ -383,7 +383,7 @@ static RPC_STATUS RPCRT_AuthorizeConnection(RpcConnection* conn,
RpcPktHdr *resp_hdr;
RPC_STATUS status;
TRACE("challenge %s, %ld bytes\n", challenge, count);
TRACE("challenge %s, %d bytes\n", challenge, count);
out.BufferType = SECBUFFER_TOKEN;
out.cbBuffer = sizeof buffer;
@ -407,7 +407,7 @@ static RPC_STATUS RPCRT_AuthorizeConnection(RpcConnection* conn,
&inp_desc, 0, &conn->ctx, &out_desc, &conn->attr, &conn->exp);
if (r)
{
WARN("InitializeSecurityContext failed with error 0x%08lx\n", r);
WARN("InitializeSecurityContext failed with error 0x%08x\n", r);
return ERROR_ACCESS_DENIED;
}
@ -488,7 +488,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
/* read packet common header */
dwRead = rpcrt4_conn_read(Connection, &common_hdr, sizeof(common_hdr));
if (dwRead != sizeof(common_hdr)) {
WARN("Short read of header, %ld bytes\n", dwRead);
WARN("Short read of header, %d bytes\n", dwRead);
status = RPC_S_PROTOCOL_ERROR;
goto fail;
}
@ -514,7 +514,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
/* read the rest of packet header */
dwRead = rpcrt4_conn_read(Connection, &(*Header)->common + 1, hdr_length - sizeof(common_hdr));
if (dwRead != hdr_length - sizeof(common_hdr)) {
WARN("bad header length, %ld/%ld bytes\n", dwRead, hdr_length - sizeof(common_hdr));
WARN("bad header length, %d/%d bytes\n", dwRead, hdr_length - sizeof(common_hdr));
status = RPC_S_PROTOCOL_ERROR;
goto fail;
}
@ -554,7 +554,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
if (((*Header)->common.frag_len < hdr_length) ||
((*Header)->common.frag_len - hdr_length < header_auth_len)) {
WARN("frag_len %d too small for hdr_length %ld and auth_len %d\n",
WARN("frag_len %d too small for hdr_length %d and auth_len %d\n",
common_hdr.frag_len, hdr_length, common_hdr.auth_len);
status = RPC_S_PROTOCOL_ERROR;
goto fail;
@ -586,7 +586,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
dwRead = rpcrt4_conn_read(Connection,
(unsigned char *)pMsg->Buffer + buffer_length, data_length);
if (dwRead != data_length) {
WARN("bad data length, %ld/%ld\n", dwRead, data_length);
WARN("bad data length, %d/%ld\n", dwRead, data_length);
status = RPC_S_PROTOCOL_ERROR;
goto fail;
}
@ -599,7 +599,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
* verifier data then it is just duplicated in all the fragments */
dwRead = rpcrt4_conn_read(Connection, auth_data, header_auth_len);
if (dwRead != header_auth_len) {
WARN("bad authentication data length, %ld/%d\n", dwRead,
WARN("bad authentication data length, %d/%d\n", dwRead,
header_auth_len);
status = RPC_S_PROTOCOL_ERROR;
goto fail;
@ -613,7 +613,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
/* read the header of next packet */
dwRead = rpcrt4_conn_read(Connection, *Header, hdr_length);
if (dwRead != hdr_length) {
WARN("invalid packet header size (%ld)\n", dwRead);
WARN("invalid packet header size (%d)\n", dwRead);
status = RPC_S_PROTOCOL_ERROR;
goto fail;
}

View File

@ -144,7 +144,7 @@ static RpcServerInterface* RPCRT4_find_interface(UUID* object,
static WINE_EXCEPTION_FILTER(rpc_filter)
{
WARN("exception caught with code 0x%08lx = %ld\n", GetExceptionCode(), GetExceptionCode());
WARN("exception caught with code 0x%08x = %d\n", GetExceptionCode(), GetExceptionCode());
TRACE("returning failure packet\n");
/* catch every exception */
return EXCEPTION_EXECUTE_HANDLER;
@ -337,7 +337,7 @@ void RPCRT4_new_client(RpcConnection* conn)
HANDLE thread = CreateThread(NULL, 0, RPCRT4_io_thread, conn, 0, NULL);
if (!thread) {
DWORD err = GetLastError();
ERR("failed to create thread, error=%08lx\n", err);
ERR("failed to create thread, error=%08x\n", err);
RPCRT4_DestroyConnection(conn);
}
/* we could set conn->thread, but then we'd have to make the io_thread wait
@ -957,7 +957,7 @@ RPC_STATUS WINAPI I_RpcServerStopListening( void )
*/
UINT WINAPI I_RpcWindowProc( void *hWnd, UINT Message, UINT wParam, ULONG lParam )
{
FIXME( "(%p,%08x,%08x,%08lx): stub\n", hWnd, Message, wParam, lParam );
FIXME( "(%p,%08x,%08x,%08x): stub\n", hWnd, Message, wParam, lParam );
return 0;
}

View File

@ -115,7 +115,7 @@ static RPC_STATUS rpcrt4_conn_listen_pipe(RpcConnection_np *npc)
if (ConnectNamedPipe(npc->pipe, &npc->ovl))
return RPC_S_OK;
WARN("Couldn't ConnectNamedPipe (error was %ld)\n", GetLastError());
WARN("Couldn't ConnectNamedPipe (error was %d)\n", GetLastError());
if (GetLastError() == ERROR_PIPE_CONNECTED) {
SetEvent(npc->ovl.hEvent);
return RPC_S_OK;
@ -138,7 +138,7 @@ static RPC_STATUS rpcrt4_conn_create_pipe(RpcConnection *Connection, LPCSTR pnam
PIPE_UNLIMITED_INSTANCES,
RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL);
if (npc->pipe == INVALID_HANDLE_VALUE) {
WARN("CreateNamedPipe failed with error %ld\n", GetLastError());
WARN("CreateNamedPipe failed with error %d\n", GetLastError());
if (GetLastError() == ERROR_FILE_EXISTS)
return RPC_S_DUPLICATE_ENDPOINT;
else
@ -167,14 +167,14 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
if (pipe != INVALID_HANDLE_VALUE) break;
err = GetLastError();
if (err == ERROR_PIPE_BUSY) {
TRACE("connection failed, error=%lx\n", err);
TRACE("connection failed, error=%x\n", err);
return RPC_S_SERVER_TOO_BUSY;
}
if (!wait)
return RPC_S_SERVER_UNAVAILABLE;
if (!WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
err = GetLastError();
WARN("connection failed, error=%lx\n", err);
WARN("connection failed, error=%x\n", err);
return RPC_S_SERVER_UNAVAILABLE;
}
}
@ -550,7 +550,7 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq,
return 0;
else if (res == WAIT_FAILED)
{
ERR("wait failed with error %ld\n", GetLastError());
ERR("wait failed with error %d\n", GetLastError());
return -1;
}
else

View File

@ -518,7 +518,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, RPC_CSTR* StringUuid)
if (!Uuid) Uuid = &uuid_nil;
sprintf( (char*)*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
sprintf( (char*)*StringUuid, "%08x-%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],
@ -541,7 +541,7 @@ RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, RPC_WSTR* StringUuid)
if (!Uuid) Uuid = &uuid_nil;
sprintf(buf, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
sprintf(buf, "%08x-%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],

View File

@ -145,7 +145,7 @@ BOOL RPCRT4_SendReceiveNPMsg(HANDLE np, PRPCSS_NP_MESSAGE msg, char *vardata, PR
}
if (count != sizeof(RPCSS_NP_REPLY)) {
ERR("read count mismatch. got %ld.\n", count);
ERR("read count mismatch. got %d.\n", count);
return FALSE;
}