New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpf: nat: fix build error in snat_v6_prepare_state() #26510
Conversation
Without ENABLE_MASQUERADE_IPV6, the `remote_ep` variable isn't used. Fix up the build. In file included from bpf_lxc.c:56: ./cilium/bpf/lib/nat.h:1694:31: error: variable 'remote_ep' set but not used [-Werror,-Wunused-but-set-variable] struct remote_endpoint_info *remote_ep; ^ 1 error generated. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Out of curiosity, where did you observe the warning? I'm surprised it didn't show up when I compiled locally or when this went through the CI 🤔
A local |
I did that, and checked again after I saw your PR, but got no error 😮. This is weird. |
@julianwiedmann Ah got it, this has to do with the clang version. I compiled on a machine with an old clang 10.0, when this warning was added to LLVM 13. Which also explains why CI didn't complain I guess. |
Without ENABLE_MASQUERADE_IPV6, the
remote_ep
variable isn't used. Fix up the build.