mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
Avoid printf type modifiers not supported by MSVC C runtime library.
The MSVC C library printf() implementation does not support the 'z', 't', 'j', or 'hh' format specifiers. This commit changes the Open vSwitch code to avoid those format specifiers, switching to standard macros from <inttypes.h> where available and inventing new macros resembling them where necessary. It also updates CodingStyle to specify the macros' use and adds a Makefile rule to report violations. Signed-off-by: Alin Serdean <aserdean@cloudbasesolutions.com> Co-authored-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -2105,7 +2105,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 %zu, needs %u)",
|
||||
"for increment (has %"PRIuSIZE", needs %u)",
|
||||
results->n, txn->inc_index + 2);
|
||||
return false;
|
||||
}
|
||||
@@ -2130,7 +2130,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 %zu elements "
|
||||
VLOG_WARN_RL(&syntax_rl, "\"select\" reply \"rows\" has %"PRIuSIZE" elements "
|
||||
"instead of 1",
|
||||
rows->u.array.n);
|
||||
return false;
|
||||
@@ -2160,7 +2160,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 %zu, needs %u)",
|
||||
"for insert (has %"PRIuSIZE", needs %u)",
|
||||
results->n, insert->op_index);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user