[PATCH 4/4] rpcrt4: Win64 printf format warning fixes.

Michael Stefaniuc mstefani at redhat.de
Thu Nov 9 16:04:48 CST 2006


Finaly rpcrt4 gets its WINE_NO_LONG_AS_INT removed.  This is a pure
format warning fix done by fixformat.pl with the exception of 1 manual
fix in a macro.

bye
	michae;
---
 dlls/rpcrt4/Makefile.in        |    2 +
 dlls/rpcrt4/cproxy.c           |    4 +--
 dlls/rpcrt4/cstub.c            |    8 +++--
 dlls/rpcrt4/ndr_clientserver.c |    2 +
 dlls/rpcrt4/ndr_fullpointer.c  |    8 +++--
 dlls/rpcrt4/ndr_marshall.c     |   62 ++++++++++++++++++++--------------------
 dlls/rpcrt4/ndr_ole.c          |    6 ++--
 dlls/rpcrt4/ndr_stubless.c     |    6 ++--
 dlls/rpcrt4/rpc_binding.c      |   10 +++---
 dlls/rpcrt4/rpc_message.c      |   18 ++++++------
 dlls/rpcrt4/rpc_server.c       |    6 ++--
 dlls/rpcrt4/rpc_transport.c    |   10 +++---
 dlls/rpcrt4/rpcrt4_main.c      |    4 +--
 dlls/rpcrt4/rpcss_np_client.c  |    2 +
 14 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/dlls/rpcrt4/Makefile.in b/dlls/rpcrt4/Makefile.in
index a6eb282..ceba174 100644
--- a/dlls/rpcrt4/Makefile.in
+++ b/dlls/rpcrt4/Makefile.in
@@ -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@
diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c
index da5deb9..f0996d0 100644
--- a/dlls/rpcrt4/cproxy.c
+++ b/dlls/rpcrt4/cproxy.c
@@ -101,7 +101,7 @@ static HRESULT WINAPI ObjectStubless(DWO
 
   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 *Thi
  */
 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;
diff --git a/dlls/rpcrt4/cstub.c b/dlls/rpcrt4/cstub.c
index 67d56aa..fdaec78 100644
--- a/dlls/rpcrt4/cstub.c
+++ b/dlls/rpcrt4/cstub.c
@@ -201,10 +201,10 @@ #endif  /* __i386__ */
 
 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(IUnk
 
     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(LPR
   __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
diff --git a/dlls/rpcrt4/ndr_clientserver.c b/dlls/rpcrt4/ndr_clientserver.c
index 3c17f27..5977d22 100644
--- a/dlls/rpcrt4/ndr_clientserver.c
+++ b/dlls/rpcrt4/ndr_clientserver.c
@@ -131,7 +131,7 @@ unsigned char* WINAPI NdrServerInitializ
  */
 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 );
 
diff --git a/dlls/rpcrt4/ndr_fullpointer.c b/dlls/rpcrt4/ndr_fullpointer.c
index 1d28023..5640769 100644
--- a/dlls/rpcrt4/ndr_fullpointer.c
+++ b/dlls/rpcrt4/ndr_fullpointer.c
@@ -35,7 +35,7 @@ PFULL_PTR_XLAT_TABLES WINAPI NdrFullPoin
     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 NdrFullPoin
             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(PFUL
                                     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(PF
     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++)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index c240e92..8ecc534 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -105,7 +105,7 @@ #define ALIGN_LENGTH(_Len, _Align) _Len 
 #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 ReadVarianc
   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 ComputeConformanceOrVaria
     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 ComputeConformanceOrVaria
     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 NdrConformantStringMemorySi
     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 NdrConformantStrin
   /* 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 @@ #endif
     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
     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
     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
     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(P
     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
     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 NdrComplexArrayMa
 
   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(PM
 
   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_ST
   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(PMI
     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_MESSA
  */
 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 NdrConformantVar
         /* 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 NdrNonEncapsulatedUnionMemo
     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 NdrBaseType
         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 @@ #define BASE_TYPE_UNMARSHALL(type) \
     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_CC
 {
     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_BIN
                                  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 NDRSContextUnmarshal
                                             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 NDRSContextUnmarshal
                                            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;
 }
diff --git a/dlls/rpcrt4/ndr_ole.c b/dlls/rpcrt4/ndr_ole.c
index e954340..6c32121 100644
--- a/dlls/rpcrt4/ndr_ole.c
+++ b/dlls/rpcrt4/ndr_ole.c
@@ -112,7 +112,7 @@ static ULONG WINAPI RpcStream_Release(LP
 {
   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_S
   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 NdrInterfacePointerBufferSiz
   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;
 }
 
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index 7539312..a6f1ec6 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -785,7 +785,7 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_ST
     /* 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_ST
         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);
     }
 
diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c
index d233f03..21d78c5 100644
--- a/dlls/rpcrt4/rpc_binding.c
+++ b/dlls/rpcrt4/rpc_binding.c
@@ -1063,7 +1063,7 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HA
   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_HA
   }
   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_HA
   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_HA
   }
   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_HAND
  */
 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;
 }
diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
index 80fbcc0..3afbf79 100644
--- a/dlls/rpcrt4/rpc_message.c
+++ b/dlls/rpcrt4/rpc_message.c
@@ -367,7 +367,7 @@ static void RPCRT4_AuthNegotiate(RpcConn
         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_AuthorizeConnect
   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_AuthorizeConnect
         &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 
   /* 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 
   /* 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 
 
     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 
     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 
        * 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 
       /* 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;
       }
diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c
index e716b53..6a5f7ac 100644
--- a/dlls/rpcrt4/rpc_server.c
+++ b/dlls/rpcrt4/rpc_server.c
@@ -144,7 +144,7 @@ static RpcServerInterface* RPCRT4_find_i
 
 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* co
   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_RpcServerStopListeni
  */
 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;
 }
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index ac6c5c2..8d54af6 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -115,7 +115,7 @@ static RPC_STATUS rpcrt4_conn_listen_pip
   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_pip
                                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(
     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_ne
         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
diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c
index 9bf839a..7fa3558 100644
--- a/dlls/rpcrt4/rpcrt4_main.c
+++ b/dlls/rpcrt4/rpcrt4_main.c
@@ -518,7 +518,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uu
 
   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 *Uu
 
   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],
diff --git a/dlls/rpcrt4/rpcss_np_client.c b/dlls/rpcrt4/rpcss_np_client.c
index cace57c..1c21323 100644
--- a/dlls/rpcrt4/rpcss_np_client.c
+++ b/dlls/rpcrt4/rpcss_np_client.c
@@ -145,7 +145,7 @@ BOOL RPCRT4_SendReceiveNPMsg(HANDLE np, 
   }
 
   if (count != sizeof(RPCSS_NP_REPLY)) {
-    ERR("read count mismatch. got %ld.\n", count);
+    ERR("read count mismatch. got %d.\n", count);
     return FALSE;
   }
 
-- 
1.4.2.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061109/a1c6d306/attachment-0001.pgp


More information about the wine-patches mailing list