mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +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:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009, 2011 Nicira, Inc.
|
||||
/* Copyright (c) 2009, 2011, 2013 Nicira, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -142,7 +142,7 @@ ovsdb_parser_finish(struct ovsdb_parser *parser)
|
||||
if (n_unused > 1) {
|
||||
ovsdb_parser_raise_error(
|
||||
parser,
|
||||
"Member '%s' and %zu other member%s "
|
||||
"Member '%s' and %"PRIuSIZE" other member%s "
|
||||
"are present but not allowed here.",
|
||||
node->name, n_unused - 1, n_unused > 2 ? "s" : "");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user