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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 14 06:51:03 CDT 2006


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

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

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

---

 programs/rpcss/np_server.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/programs/rpcss/np_server.c b/programs/rpcss/np_server.c
index 5b50898..47fa348 100644
--- a/programs/rpcss/np_server.c
+++ b/programs/rpcss/np_server.c
@@ -204,8 +204,8 @@ static VOID HandlerThread(LPVOID lpvPipe
 	);
 	if ( (!success) || (bytesread != sizeof(RPCSS_NP_MESSAGE)) ||
              (vardata_payload_msg.message_type != RPCSS_NP_MESSAGE_TYPEID_VARDATAPAYLOADMSG) ) {
-	  WINE_ERR("vardata payload read failure! (s=%s,br=%ld,exp_br=%d,mt=%u,mt_exp=%u\n",
-	    success ? "TRUE" : "FALSE", bytesread, sizeof(RPCSS_NP_MESSAGE), 
+	  WINE_ERR("vardata payload read failure! (s=%s,br=%ld,mt=%u,mt_exp=%u\n",
+	    success ? "TRUE" : "FALSE", bytesread,
 	    vardata_payload_msg.message_type, RPCSS_NP_MESSAGE_TYPEID_VARDATAPAYLOADMSG);
 	  success = FALSE;
 	  break;
@@ -237,8 +237,7 @@ static VOID HandlerThread(LPVOID lpvPipe
     );
 
     if ( (!success) || (written != sizeof(RPCSS_NP_REPLY)) )
-      WINE_WARN("Message reply failed. (successs=%s, br=%ld, exp_br=%d)\n",
-        success ? "TRUE" : "FALSE", written, sizeof(RPCSS_NP_REPLY));
+      WINE_WARN("Message reply failed. (success=%d, br=%ld)\n", success, written);
     else
       WINE_TRACE("Reply sent successfully.\n");
   } else 
@@ -426,7 +425,7 @@ static BOOL RPCSS_SendReceiveNPMsg(HANDL
   }
 
   if (count != sizeof(RPCSS_NP_REPLY)) {
-    WINE_ERR("read count mismatch. got %ld, expected %u.\n", count, sizeof(RPCSS_NP_REPLY));
+    WINE_ERR("read count mismatch, got %ld.\n", count);
     return FALSE;
   }
 




More information about the wine-cvs mailing list