-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pkg: replace header guards with #pragma once #21701
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
base: master
Are you sure you want to change the base?
Conversation
52167ef
to
512a3fa
Compare
I did not go through these files yet, but maybe you can run the latest revision of the script on this PR too? |
512a3fa
to
7b57ce3
Compare
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.
I'm about halfway through, but the script still does not seem to be 100% reliable at the #endif
s regarding double newlines. Maybe you can check it again and adapt it?
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.
/*
* Generated by ./update_mk.sh, don't modify directly.
* Default CONFIG_ parameters from the SDK package.
*/
This file should probably not be modified directly.
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
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.
Double newline.
#endif | ||
|
||
#endif /* LUA_BUILTIN_H */ | ||
|
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.
Double newline.
extern "C" | ||
} | ||
#endif | ||
|
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.
Double newline.
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.
Unrelated: it was good that this file got migrated, because the closing header guard was before the _cplusplus
thingy. That would've caused weird issues when using C++...
#endif | ||
|
||
#endif /* OPENDSME_OPENDSME_H */ | ||
|
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.
Double newline.
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
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.
Double newline.
I reviewed the rest of the files and found no further issues. So once the remaining review comments are addressed, we can get this merged. |
Contribution description
This is part of a greater effort to replace all header guards in RIOT with
#pragma once
. This PR only affects all headers underpkg/
, excluding those that have a path that contains/vendor/
.It should now remove double empty lines around the
#ifndef
block.Issues/PRs references
Tracking issue #21335