2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

flow: Fix MSVC compile errors.

This fixes some MSVC build errors introduced by commit 74ff3298c
(userspace: Define and use struct eth_addr.)

MSVC doesn't like the change in 'const' between function declaration and
definition: it reports "formal parameter 2 different from declaration" for
each of the functions in flow.h corrected by this (commit.  I think it's
technically wrong about that, standards-wise.)

MSVC doesn't like an empty-brace initializer.  (I think it's technically
right about that, standards-wise.)

This commit attempts to fix both problems, but I have not tested it with
MSVC.

CC: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Tested-by: Nithin Raju <nithin@vmware.com>
This commit is contained in:
Ben Pfaff
2015-08-30 07:40:31 -07:00
parent 572e54faff
commit aba5d6dd52
2 changed files with 4 additions and 4 deletions

View File

@@ -742,7 +742,7 @@ miniflow_extract(struct dp_packet *packet, struct miniflow *dst)
} else if (OVS_LIKELY(nw_proto == IPPROTO_ICMPV6)) {
if (OVS_LIKELY(size >= sizeof(struct icmp6_hdr))) {
const struct in6_addr *nd_target = NULL;
struct eth_addr arp_buf[2] = { };
struct eth_addr arp_buf[2] = { { { { 0 } } } };
const struct icmp6_hdr *icmp = data_pull(&data, &size,
sizeof *icmp);
parse_icmpv6(&data, &size, icmp, &nd_target, arp_buf);

View File

@@ -529,7 +529,7 @@ flowmap_clear(struct flowmap *fm, size_t idx, unsigned int n_bits)
/* OR the bits in the flowmaps. */
static inline struct flowmap
flowmap_or(struct flowmap a, const struct flowmap b)
flowmap_or(struct flowmap a, struct flowmap b)
{
struct flowmap map;
size_t unit;
@@ -542,7 +542,7 @@ flowmap_or(struct flowmap a, const struct flowmap b)
/* AND the bits in the flowmaps. */
static inline struct flowmap
flowmap_and(struct flowmap a, const struct flowmap b)
flowmap_and(struct flowmap a, struct flowmap b)
{
struct flowmap map;
size_t unit;
@@ -554,7 +554,7 @@ flowmap_and(struct flowmap a, const struct flowmap b)
}
static inline bool
flowmap_is_empty(const struct flowmap fm)
flowmap_is_empty(struct flowmap fm)
{
map_t map;