-
Notifications
You must be signed in to change notification settings - Fork 33
Refactor: Unify __inline and static inline function declarations #365
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
Conversation
I replaced all instances of `__inline` with `static inline` for improved consistency and portability across different compilers. This change addresses potential linking issues and ensures more standardized handling of inline functions. The following files were modified: - sbin/ifconfig/ifieee80211.c - sbin/nvmecontrol/nvmecontrol.h - sbin/hastd/refcnt.h - sbin/hastd/synch.h - sbin/hastd/activemap.c - sbin/ggate/shared/ggate.h - sbin/pfctl/pf_ruleset.c
Can one of the admins verify this patch? |
Reviewer's GuideThis PR refactors inline declarations by replacing all nonstandard Class Diagram: Standardization of Inline Function SpecifiersclassDiagram
class ObsoleteInlineSpecifier {
<<Concept: C Function Specifier>>
+specifier_keyword: String = "__inline"
+status: String = "Non-standard, compiler-specific"
}
class StandardC99InlineSpecifier {
<<Concept: C Function Specifier>>
+specifier_keyword: String = "inline"
+status: String = "Standard C99"
+common_form_static: String = "static inline type func_name(...);"
+common_form_plain: String = "inline type func_name(...);"
}
ObsoleteInlineSpecifier --o StandardC99InlineSpecifier : "Replaced by usage of"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
@sourcery-ai review
Necessary corrections have been made.
12 Haz 2025 Per 12:06 tarihinde sourcery-ai[bot] ***@***.***>
şunu yazdı:
… *sourcery-ai[bot]* left a comment (ghostbsd/ghostbsd-src#365)
<#365 (comment)>
🧙 Sourcery is reviewing your pull request!
------------------------------
Tips and commands Interacting with Sourcery
- *Trigger a new review:* Comment @sourcery-ai review on the pull
request.
- *Continue discussions:* Reply directly to Sourcery's review comments.
- *Generate a GitHub issue from a review comment:* Ask Sourcery to
create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
- *Generate a pull request title:* Write @sourcery-ai anywhere in the
pull
request title to generate a title at any time. You can also comment
@sourcery-ai title on the pull request to (re-)generate the title at
any time.
- *Generate a pull request summary:* Write @sourcery-ai summary
anywhere in
the pull request body to generate a PR summary at any time exactly
where you
want it. You can also comment @sourcery-ai summary on the pull request
to
(re-)generate the summary at any time.
- *Generate reviewer's guide:* Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
- *Resolve all Sourcery comments:* Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
- *Dismiss all Sourcery reviews:* Comment @sourcery-ai dismiss on the
pull
request to dismiss all existing Sourcery reviews. Especially useful if
you
want to start fresh with a new review - don't forget to comment
@sourcery-ai review to trigger a new review!
Customizing Your Experience
Access your dashboard <https://app.sourcery.ai> to:
- Enable or disable review features such as the Sourcery-generated
pull request
summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team ***@***.***> for questions or
feedback.
- Visit our documentation <https://docs.sourcery.ai> for detailed
guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter
<https://x.com/SourceryAI>, LinkedIn
<https://www.linkedin.com/company/sourcery-ai/> or GitHub
<https://github.com/sourcery-ai>.
—
Reply to this email directly, view it on GitHub
<#365 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BOMX7Z33MSEFVQJCX2ZRXQD3DE7JZAVCNFSM6AAAAAB7EZUEVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNRVG42TIMJWGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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.
Hey @rkarahan80 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -82,7 +82,7 @@ __END_DECLS | |||
#ifdef _EXTERNALIZE_CTYPE_INLINES_ | |||
#define _USE_CTYPE_INLINE_ | |||
#define static | |||
#define __inline | |||
#define inline |
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.
issue (bug_risk): Redefining 'inline' globally may have unintended side-effects
This macro removes all 'inline' keywords in this header, which could affect other inline functions. Consider limiting its scope or undefining '__inline' instead to avoid interfering with unrelated code.
I replaced all instances of
__inline
withstatic inline
for improved consistency and portability across different compilers.This change addresses potential linking issues and ensures more standardized handling of inline functions.
The following files were modified:
Summary by Sourcery
Unify inline function declarations by replacing compiler-specific __inline with standard static inline or inline across the codebase to improve consistency, portability, and avoid potential linking issues.
Enhancements: