[ovs-dev] [PATCH 2/2] ofproto: Fix compiler warning.

Ethan Jackson ethan at nicira.com
Thu May 19 01:10:02 UTC 2011


ofproto/ofproto.c:1681:9: error: format '%d' expects argument of
type 'int', but argument 3 has type 'size_t'
---
 ofproto/ofproto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index beab99c..f71a049 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -1678,7 +1678,7 @@ handle_table_stats_request(struct ofconn *ofconn,
     ots = ofpbuf_put_zeros(msg, sizeof *ots * p->n_tables);
     for (i = 0; i < p->n_tables; i++) {
         ots[i].table_id = i;
-        sprintf(ots[i].name, "table%d", i);
+        sprintf(ots[i].name, "table%lu", i);
         ots[i].wildcards = htonl(OFPFW_ALL);
         ots[i].max_entries = htonl(1000000); /* An arbitrary big number. */
         ots[i].active_count = htonl(classifier_count(&p->tables[i]));
-- 
1.7.4.4




More information about the dev mailing list