Alexandre Julliard : ole32: Don' t use sizeof in traces to avoid printf format warnings.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 14 06:50:57 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 96ad688174cfe06c979176b657c8b16c62da4c63
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=96ad688174cfe06c979176b657c8b16c62da4c63

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jun 13 14:11:15 2006 +0200

ole32: Don't use sizeof in traces to avoid printf format warnings.

---

 dlls/ole32/oleproxy.c |    2 +-
 dlls/ole32/stg_prop.c |    9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c
index 4e2ebb9..fddbf54 100644
--- a/dlls/ole32/oleproxy.c
+++ b/dlls/ole32/oleproxy.c
@@ -159,7 +159,7 @@ CFStub_Invoke(
 	ULONG		res;
 
 	if (msg->cbBuffer < sizeof(IID)) {
-	    FIXME("Not enough bytes in buffer (%ld instead of %d)?\n",msg->cbBuffer,sizeof(IID));
+	    FIXME("Not enough bytes in buffer (%ld)?\n",msg->cbBuffer);
 	    return E_FAIL;
 	}
 	memcpy(&iid,msg->Buffer,sizeof(iid));
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index 1933f83..ac4a6b6 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -1159,7 +1159,7 @@ static HRESULT PropertyStorage_ReadHeade
     {
         if (count != sizeof(buf))
         {
-            WARN("read %ld, expected %d\n", count, sizeof(buf));
+            WARN("read only %ld\n", count);
             hr = STG_E_INVALIDHEADER;
         }
         else
@@ -1194,7 +1194,7 @@ static HRESULT PropertyStorage_ReadFmtId
     {
         if (count != sizeof(buf))
         {
-            WARN("read %ld, expected %d\n", count, sizeof(buf));
+            WARN("read only %ld\n", count);
             hr = STG_E_INVALIDHEADER;
         }
         else
@@ -1223,7 +1223,7 @@ static HRESULT PropertyStorage_ReadSecti
     {
         if (count != sizeof(buf))
         {
-            WARN("read %ld, expected %d\n", count, sizeof(buf));
+            WARN("read only %ld\n", count);
             hr = STG_E_INVALIDHEADER;
         }
         else
@@ -1325,8 +1325,7 @@ static HRESULT PropertyStorage_ReadFromS
     /* The section size includes the section header, so check it */
     if (sectionHdr.cbSection < sizeof(PROPERTYSECTIONHEADER))
     {
-        WARN("section header too small, got %ld, expected at least %d\n",
-         sectionHdr.cbSection, sizeof(PROPERTYSECTIONHEADER));
+        WARN("section header too small, got %ld\n", sectionHdr.cbSection);
         hr = STG_E_INVALIDHEADER;
         goto end;
     }




More information about the wine-cvs mailing list