Skip to content

Commit

Permalink
classifier: Silence sparse warning (sparse bug)
Browse files Browse the repository at this point in the history
This silences the following sparse warning which appears to be a bug
in sparse:

	lib/classifier-private.h:210:45: warning: call with no type!
	lib/classifier-private.h:179:45: warning: call with no type!

Can be reverted when sparse has been fixed.

Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Reviewed-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
Thomas Graf authored and blp committed Dec 2, 2014
1 parent 5b5b11e commit a1235ee
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/classifier-private.h
Expand Up @@ -176,12 +176,13 @@ flow_hash_in_minimask_range(const struct flow *flow,
const uint32_t *mask_values = miniflow_get_u32_values(&mask->masks);
const uint32_t *flow_u32 = (const uint32_t *)flow;
unsigned int offset;
uint64_t map = miniflow_get_map_in_range(&mask->masks, start, end,
&offset);
const uint32_t *p = mask_values + offset;
uint64_t map;
const uint32_t *p;
uint32_t hash = *basis;
int idx;

map = miniflow_get_map_in_range(&mask->masks, start, end, &offset);
p = mask_values + offset;
MAP_FOR_EACH_INDEX(idx, map) {
hash = hash_add(hash, flow_u32[idx] & *p++);
}
Expand All @@ -207,11 +208,12 @@ flow_wildcards_fold_minimask_range(struct flow_wildcards *wc,
{
uint32_t *dst_u32 = (uint32_t *)&wc->masks;
unsigned int offset;
uint64_t map = miniflow_get_map_in_range(&mask->masks, start, end,
&offset);
const uint32_t *p = miniflow_get_u32_values(&mask->masks) + offset;
uint64_t map;
const uint32_t *p;
int idx;

map = miniflow_get_map_in_range(&mask->masks, start, end, &offset);
p = miniflow_get_u32_values(&mask->masks) + offset;
MAP_FOR_EACH_INDEX(idx, map) {
dst_u32[idx] |= *p++;
}
Expand Down

0 comments on commit a1235ee

Please sign in to comment.