Skip to content
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

Fix warnings in compilation using clang 15 #3904

Merged
merged 2 commits into from
Feb 22, 2023
Merged

Fix warnings in compilation using clang 15 #3904

merged 2 commits into from
Feb 22, 2023

Conversation

vlstill
Copy link
Contributor

@vlstill vlstill commented Feb 22, 2023

Newer clang (13+) has some extra warnings for variables that are set and modified (e.g. ++), but their value is never used. With these changes, build passes again with clang 15 and -Werror. I had to suppress the warning in p4parser as it is in generated code.

@vlstill
Copy link
Contributor Author

vlstill commented Feb 22, 2023

This error is spuriously occurring actually quite often :-/ (in Ubuntu 20 this time).

E: Failed to fetch [https://download.opensuse.org/repositories/home:/p4lang/xUbuntu_20.04/./amd64/p4lang-bmv2_1.15.0-3_amd64.deb](https://download.opensuse.org/repositories/home:/p4lang/xUbuntu_20.04/amd64/p4lang-bmv2_1.15.0-3_amd64.deb)  502  Bad Gateway [IP: 195.135.221.134 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Fetched 34.6 MB in 8s (4316 kB/s)
Error: Process completed with exit code 100.

It seems like a network issue, I presume this is running on github-managed machines so we can't do much about it, right?

Copy link
Contributor

@davidbolvansky davidbolvansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

Newer clang (13+) has some extra warnings for variables that are set and modified (e.g. ++), but their value is never used.

fyi, implemented by me ;)

@vlstill
Copy link
Contributor Author

vlstill commented Feb 22, 2023

fyi, implemented by me ;)

Oh wow :-D, great!

@vlstill vlstill merged commit 07fad1f into main Feb 22, 2023
@vlstill vlstill deleted the vstill/clang-15 branch February 22, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants