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

lib/ovsdb-idl.c: In function 'ovsdb_idl_txn_process_inc_reply':
lib/ovsdb-idl.c:1524: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
lib/ovsdb-idl.c:1538: warning: format '%ld' expects type 'long int', but argument 5 has type 'long long int'
lib/ovsdb-idl.c:1550: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
lib/ovsdb-idl.c: In function 'ovsdb_idl_txn_process_insert_reply':
lib/ovsdb-idl.c:1579: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'

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

index 3f3ce55..94dd466 100644 (file)
@@ -1522,7 +1522,7 @@ ovsdb_idl_txn_process_inc_reply(struct ovsdb_idl_txn *txn,
 
     if (txn->inc_index + 2 > results->n) {
         VLOG_WARN_RL(&syntax_rl, "reply does not contain enough operations "
-                     "for increment (has %u, needs %u)",
+                     "for increment (has %zu, needs %u)",
                      results->n, txn->inc_index + 2);
         return false;
     }
@@ -1536,7 +1536,7 @@ ovsdb_idl_txn_process_inc_reply(struct ovsdb_idl_txn *txn,
     }
     if (count->u.integer != 1) {
         VLOG_WARN_RL(&syntax_rl,
-                     "\"mutate\" reply \"count\" is %"PRId64" instead of 1",
+                     "\"mutate\" reply \"count\" is %lld instead of 1",
                      count->u.integer);
         return false;
     }
@@ -1547,7 +1547,7 @@ ovsdb_idl_txn_process_inc_reply(struct ovsdb_idl_txn *txn,
         return false;
     }
     if (rows->u.array.n != 1) {
-        VLOG_WARN_RL(&syntax_rl, "\"select\" reply \"rows\" has %u elements "
+        VLOG_WARN_RL(&syntax_rl, "\"select\" reply \"rows\" has %zu elements "
                      "instead of 1",
                      rows->u.array.n);
         return false;
@@ -1577,7 +1577,7 @@ ovsdb_idl_txn_process_insert_reply(struct ovsdb_idl_txn_insert *insert,
 
     if (insert->op_index >= results->n) {
         VLOG_WARN_RL(&syntax_rl, "reply does not contain enough operations "
-                     "for insert (has %u, needs %u)",
+                     "for insert (has %zu, needs %u)",
                      results->n, insert->op_index);
         return false;
     }