[dpdk-stable] [dpdk-dev] [PATCH] lib/bpf: fix clang build warnings for aarch64

Jerin Jacob jerinjacobk at gmail.com
Fri Nov 15 04:45:04 CET 2019


On Fri, Nov 15, 2019 at 8:48 AM Ruifeng Wang <ruifeng.wang at arm.com> wrote:
>
> Couple of warnings will block build when warnings been treated as errors.
> Clang version 8.0 was used.
>
> Warning messages during build:
> ../lib/librte_bpf/bpf_jit_arm64.c:1438:26: warning: incompatible pointer
> types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
> 'char *' [-Wincompatible-pointer-types]
>         __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
>                                 ^~~~~~~
> ../lib/librte_bpf/bpf_jit_arm64.c:1438:35: warning: incompatible pointer
> types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type
> 'char *' [-Wincompatible-pointer-types]
>         __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
>                                          ^~~~~~~~~~~~~~~~~
>
> Fixes: f3e516772464 ("bpf/arm: add prologue and epilogue")
> Cc: stable at dpdk.org

No need to CC stable as this has been added in this release.

Is clang prototype for __builtin___clear_cache() different? If so,
update the git commit for the reason for the failure.

in gcc[1], it is void *.
[1]
void __builtin___clear_cache (void *begin, void *end)

>
> Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> Reviewed-by: Phil Yang <phil.yang at arm.com>
> Reviewed-by: Gavin Hu <gavin.hu at arm.com>


More information about the stable mailing list