diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2024-01-23 23:56:24 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-01-24 02:53:04 +0300 |
commit | 756e34da5380e4c0ed2cfbe5259e1b015567a099 (patch) | |
tree | 7a2fa6f17bda4a2e9fd2f656aebe254ad62e1c61 /.rustfmt.toml | |
parent | edb799035dd7d41c3e81e1bef83e2a2120b08abb (diff) | |
download | linux-756e34da5380e4c0ed2cfbe5259e1b015567a099.tar.xz |
bpf: fix constraint in test_tcpbpf_kern.c
GCC emits a warning:
progs/test_tcpbpf_kern.c:60:9: error: ‘op’ is used uninitialized [-Werror=uninitialized]
when an uninialized op is used with a "+r" constraint. The + modifier
means a read-write operand, but that operand in the selftest is just
written to.
This patch changes the selftest to use a "=r" constraint. This
pacifies GCC.
Tested in bpf-next master.
No regressions.
Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
Cc: Yonghong Song <yhs@meta.com>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: david.faust@oracle.com
Cc: cupertino.miranda@oracle.com
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240123205624.14746-1-jose.marchesi@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to '.rustfmt.toml')
0 files changed, 0 insertions, 0 deletions