Skip to content

fix: resolve compilation warnings#265

Open
YangQi0408 wants to merge 1 commit intobmax121:mainfrom
YangQi0408:fix-warnings
Open

fix: resolve compilation warnings#265
YangQi0408 wants to merge 1 commit intobmax121:mainfrom
YangQi0408:fix-warnings

Conversation

@YangQi0408
Copy link
Copy Markdown
Contributor

  • 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>
@Admirepowered
Copy link
Copy Markdown
Collaborator

低于6.1的原型函数返回类型是int,如果要正确修复应该是定义新的int,返回类型虽然不影响,但是返回值可能不止0或者1,还有可能是其他值

@Admirepowered
Copy link
Copy Markdown
Collaborator

struct dir_context {
要修复的话需要在这里新增一个dir_context_int,有点麻烦的

@YangQi0408
Copy link
Copy Markdown
Contributor Author

struct dir_context {
要修复的话需要在这里新增一个dir_context_int,有点麻烦的

项目目前的dir_context的actor都是bool类型的,所以_int变体只在返回值语义中有区别,而且它也没有其他的返回值

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants