ofproto: fix compile warning of ofproto/ofproto.c
authorWei Yongjun <yjwei@cn.fujitsu.com>
Mon, 17 May 2010 07:14:55 +0000 (15:14 +0800)
committerBen Pfaff <blp@nicira.com>
Mon, 17 May 2010 16:46:46 +0000 (09:46 -0700)
This patch fixed the following compile warning:

ofproto/ofproto.c: In function 'handle_role_request':
ofproto/ofproto.c:3543: warning: format '%zu' expects type 'size_t', but argument 5 has type 'int'
ofproto/ofproto.c: In function 'handle_vendor':
ofproto/ofproto.c:3593: warning: format '%zu' expects type 'size_t', but argument 5 has type 'int'
ofproto/ofproto.c:3602: warning: format '%zu' expects type 'size_t', but argument 5 has type 'int'

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
ofproto/ofproto.c

index dcf8683..4197787 100644 (file)
@@ -3540,7 +3540,7 @@ handle_role_request(struct ofproto *ofproto,
     uint32_t role;
 
     if (ntohs(msg->header.length) != sizeof *nrr) {
-        VLOG_WARN_RL(&rl, "received role request of length %zu (expected %zu)",
+        VLOG_WARN_RL(&rl, "received role request of length %u (expected %zu)",
                      ntohs(msg->header.length), sizeof *nrr);
         return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
     }
@@ -3590,7 +3590,7 @@ handle_vendor(struct ofproto *p, struct ofconn *ofconn, void *msg)
     struct nicira_header *nh;
 
     if (ntohs(ovh->header.length) < sizeof(struct ofp_vendor_header)) {
-        VLOG_WARN_RL(&rl, "received vendor message of length %zu "
+        VLOG_WARN_RL(&rl, "received vendor message of length %u "
                           "(expected at least %zu)",
                    ntohs(ovh->header.length), sizeof(struct ofp_vendor_header));
         return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
@@ -3599,7 +3599,7 @@ handle_vendor(struct ofproto *p, struct ofconn *ofconn, void *msg)
         return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_VENDOR);
     }
     if (ntohs(ovh->header.length) < sizeof(struct nicira_header)) {
-        VLOG_WARN_RL(&rl, "received Nicira vendor message of length %zu "
+        VLOG_WARN_RL(&rl, "received Nicira vendor message of length %u "
                           "(expected at least %zu)",
                      ntohs(ovh->header.length), sizeof(struct nicira_header));
         return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);