]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf, hashmap: Fix signedness warnings
authorIan Rogers <irogers@google.com>
Fri, 15 May 2020 16:50:03 +0000 (09:50 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 15 May 2020 23:06:05 +0000 (01:06 +0200)
commit4f1b0178b772d7ed50b66a9f5089ea72459dfb0b
treefb494f06c3e84fa224b6ff2baced24437ad4092a
parente1f0b1b6f625c100a13cfde8e38b2212aabedc30
libbpf, hashmap: Fix signedness warnings

Fixes the following warnings:

  hashmap.c: In function ‘hashmap__clear’:
  hashmap.h:150:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
    150 |  for (bkt = 0; bkt < map->cap; bkt++)        \

  hashmap.c: In function ‘hashmap_grow’:
  hashmap.h:150:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
    150 |  for (bkt = 0; bkt < map->cap; bkt++)        \

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200515165007.217120-4-irogers@google.com
tools/lib/bpf/hashmap.c