Commit de21efba authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

rpcrt4: Win64 printf format warning fixes.

parent 718f3c35
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@
......
......@@ -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;
......
......@@ -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
......
......@@ -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 );
......
......@@ -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++)
......
......@@ -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;
}
......
......@@ -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);
}
......
......@@ -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;
}
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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],
......
......@@ -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;
}
......
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