-
Notifications
You must be signed in to change notification settings - Fork 3.4k
bpf: Replace old school header guards with #pragma once #32235
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
Merged
dylandreimerink
merged 4 commits into
cilium:main
from
dylandreimerink:feature/pragma-once
Jun 10, 2024
Merged
bpf: Replace old school header guards with #pragma once #32235
dylandreimerink
merged 4 commits into
cilium:main
from
dylandreimerink:feature/pragma-once
Jun 10, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d6a933a
to
381fd7e
Compare
/test |
381fd7e
to
45697a3
Compare
/test |
45697a3
to
eaff961
Compare
/test |
eaff961
to
2379576
Compare
/test |
000d169
to
ae649a1
Compare
/test |
borkmann
reviewed
May 27, 2024
borkmann
reviewed
May 27, 2024
borkmann
approved these changes
May 27, 2024
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.
(ack, assuming small nits get fixed)
5c6ff0e
to
8c58c48
Compare
/test |
c331ac0
to
af04a7a
Compare
pchaigno
approved these changes
Jun 3, 2024
af04a7a
to
0ce6ecd
Compare
/test |
1 similar comment
/test |
0ce6ecd
to
0855033
Compare
/test |
9a1fc12
to
e42fb75
Compare
This commit replaces the old school header guards with #pragma once. This is a more modern way of preventing multiple inclusion of the same header file. In future we will be using scripts to remove macros, by replacing these now with the proper #pragma once we avoid having to write exceptions for these in the scripts. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
This test was using global variables to store mocking settings. This is triggering CI, likely due to a change in the Go code somewhere. So switching the test over to using a map to store these settings. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
The config_replacement.h was originally meant to replace static_data variables for tests. But since then the implementation has changed so static_data always has valid defaults and values can be changed with special test macros. So we no longer need config_replacement.h. Removing it now since it relied on header guards to prevent multiple inclusions of the replaced variables, which we removed. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
This tool checks for legacy header guards and will throw an error if it finds any. Adding this to the CI should ensure that we don't add any more legacy header guards once we switched to prama-once. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
e42fb75
to
0c869bb
Compare
/test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit replaces the old school header guards with #pragma once. This is a more modern way of preventing multiple inclusion of the same header file.
In future we will be using scripts to remove macros, by replacing these now with the proper #pragma once we avoid having to write exceptions for these in the scripts.