fix: resolve compilation warnings#265
Open
YangQi0408 wants to merge 1 commit intobmax121:mainfrom
Open
Conversation
Contributor
YangQi0408
commented
May 1, 2026
- Add #ifndef guards for READ_ONCE/WRITE_ONCE in kernel/linux/include/linux/compiler.h to avoid redefinition with rwonce.h
- Fix nested comment warning in kernel/patch/android/userd.c by replacing /* */ comment with //
- Fix incompatible function pointer type warnings: change return type of apk_inner_actor_int and apk_outer_actor_int from int to bool
- Remove unused code in userd.c: path_has_suffix, path_is_exact, apk_has_v1_signature_file functions and global_pkg_pos variable
* Add #ifndef guards for READ_ONCE/WRITE_ONCE in kernel/linux/include/linux/compiler.h to avoid redefinition with rwonce.h * Fix nested comment warning in kernel/patch/android/userd.c by replacing /* */ comment with // * Fix incompatible function pointer type warnings: change return type of apk_inner_actor_int and apk_outer_actor_int from int to bool * Remove unused code in userd.c: path_has_suffix, path_is_exact, apk_has_v1_signature_file functions and global_pkg_pos variable Signed-off-by: YangQi0408 <a123er3643@163.com>
Collaborator
|
低于6.1的原型函数返回类型是int,如果要正确修复应该是定义新的int,返回类型虽然不影响,但是返回值可能不止0或者1,还有可能是其他值 |
Collaborator
|
KernelPatch/kernel/linux/include/linux/fs.h Line 364 in 84169d5 |
Contributor
Author
项目目前的dir_context的actor都是bool类型的,所以_int变体只在返回值语义中有区别,而且它也没有其他的返回值 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.