2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +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:
Alin Serdean
2013-11-25 23:38:48 -08:00
committed by Ben Pfaff
parent 4d3daf0481
commit 34582733d9
47 changed files with 180 additions and 133 deletions

View File

@@ -975,8 +975,8 @@ netdev_linux_send(struct netdev *netdev_, const void *data, size_t size)
}
return errno;
} else if (retval != size) {
VLOG_WARN_RL(&rl, "sent partial Ethernet packet (%zd bytes of "
"%zu) on %s", retval, size, netdev_get_name(netdev_));
VLOG_WARN_RL(&rl, "sent partial Ethernet packet (%"PRIuSIZE"d bytes of "
"%"PRIuSIZE") on %s", retval, size, netdev_get_name(netdev_));
return EMSGSIZE;
} else {
return 0;