From: Wei Yongjun Date: Mon, 17 May 2010 07:14:55 +0000 (+0800) Subject: ofproto: fix compile warning of ofproto/ofproto.c X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=100e95db240fdea0e2b650e9fc1b59a962ae3847;p=openvswitch ofproto: fix compile warning of ofproto/ofproto.c 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 --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index dcf8683f..41977874 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -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);