Fix clang build

Change-Id: I678d7e0a7c91c7daf9feb3ec23a633b96fab56a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2016-06-30 01:02:17 +02:00
parent 33879c95b8
commit ec175104cf
3 changed files with 8 additions and 8 deletions

View File

@ -762,9 +762,9 @@ ip6_lookup_inline (vlib_main_t * vm,
/* Only process the HBH Option Header if explicitly configured to do so */
next0 = (ip0->protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS) && im->hbh_enabled &&
adj_index0 ? IP6_LOOKUP_NEXT_HOP_BY_HOP : adj0->lookup_next_index;
adj_index0 ? (ip_lookup_next_t) IP6_LOOKUP_NEXT_HOP_BY_HOP : adj0->lookup_next_index;
next1 = (ip1->protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS) && im->hbh_enabled &&
adj_index1 ? IP6_LOOKUP_NEXT_HOP_BY_HOP : adj1->lookup_next_index;
adj_index1 ? (ip_lookup_next_t) IP6_LOOKUP_NEXT_HOP_BY_HOP : adj1->lookup_next_index;
vnet_buffer (p0)->ip.flow_hash =
vnet_buffer(p1)->ip.flow_hash = 0;
@ -893,7 +893,7 @@ ip6_lookup_inline (vlib_main_t * vm,
/* Only process the HBH Option Header if explicitly configured to do so */
next0 = (ip0->protocol == IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS) && im->hbh_enabled &&
adj_index0 ? IP6_LOOKUP_NEXT_HOP_BY_HOP : adj0->lookup_next_index;
adj_index0 ? (ip_lookup_next_t) IP6_LOOKUP_NEXT_HOP_BY_HOP : adj0->lookup_next_index;
vnet_buffer (p0)->ip.flow_hash = 0;

View File

@ -1079,10 +1079,10 @@ int ip6_ioam_set_destination (ip6_address_t *addr, u32 mask_width, u32 vrf_id,
adj->saved_lookup_next_index = adj->lookup_next_index;
if (is_add)
adj->lookup_next_index = IP6_LOOKUP_NEXT_ADD_HOP_BY_HOP;
adj->lookup_next_index = (ip_lookup_next_t) IP6_LOOKUP_NEXT_ADD_HOP_BY_HOP;
if (is_pop)
adj->lookup_next_index = IP6_LOOKUP_NEXT_POP_HOP_BY_HOP;
adj->lookup_next_index = (ip_lookup_next_t) IP6_LOOKUP_NEXT_POP_HOP_BY_HOP;
hm->adj = *addr;
hm->ioam_flag = (is_add ? IOAM_HBYH_ADD :

View File

@ -347,14 +347,14 @@ always_inline uword clib_bitmap_last_set (uword * ai)
{
uword i;
for (i = vec_len (ai) - 1; i >= 0 ; i--)
for (i = vec_len (ai); i > 0 ; i--)
{
uword x = ai[i];
uword x = ai[i - 1];
if (x != 0)
{
uword first_bit;
count_leading_zeros (first_bit, x);
return (i + 1) * BITS (ai[0]) - first_bit - 1;
return (i) * BITS (ai[0]) - first_bit - 1;
}
}
return ~0;