-
Notifications
You must be signed in to change notification settings - Fork 93
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 errors raised by missing-prototypes #46
Conversation
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.
Improve git commit message!
Can I fix it like this? |
No, you must mention the considerations of upstream Linux changes that enforce function prototype checks, along with their impact on this project. Additionally, it is important to be aware of how to avoid missing function prototypes. |
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.
Mention upstream SHA-1 hash which enforce missing-prototypes checks.
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.
Make the git commit message grammatical accuracy.
The recent upstream commit (0fcb708) in the Linux kernel globally enforces function prototype checks. This means that it's crucial for each function to have a declaration to validate that both the caller and the callee expect the same argument types. Failure to comply with this requirement may result in real bugs due to mismatched prototypes. Therefore, in this commit, we need to add function prototypes to the header files or declare functions with static to ensure compatibility with these changes.
Thank @HotMercury for contributing! |
In the current attempt to run simplefs on the Linux kernel v6.8 environment, encountering the error "no previous prototype for
simplefs_mount
" indicates a need for additional function declarations.The reason why it worked in previous versions is that the changes related to
-Wmissing-declarations
and-Wmissing-prototypes
were introduced in 6.8-rc1 in commit 0fcb708 .