Skip to content
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

-Wreturn-type in arch/x86/boot/compressed/kaslr.c #360

Closed
nickdesaulniers opened this issue Feb 11, 2019 · 3 comments
Closed

-Wreturn-type in arch/x86/boot/compressed/kaslr.c #360

nickdesaulniers opened this issue Feb 11, 2019 · 3 comments

Comments

@nickdesaulniers
Copy link
Member

@nickdesaulniers nickdesaulniers commented Feb 11, 2019

from https://travis-ci.com/ClangBuiltLinux/continuous-integration/jobs/176700062

arch/x86/boot/compressed/kaslr.c:702:1: warning: control may reach end of non-void function [-Wreturn-type]

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/x86/boot/compressed/kaslr.c#n654

Looks like process_mem_region has an return within an #ifdef. That final return should be placed outside of the #ifdef.

@kragniz

This comment has been minimized.

Copy link
Member

@kragniz kragniz commented Mar 2, 2019

@nickdesaulniers

This comment has been minimized.

fengguang pushed a commit to 0day-ci/linux that referenced this issue Mar 7, 2019
When compiling with -Wreturn-type, clang warns:

arch/x86/boot/compressed/kaslr.c:704:1: warning: control may reach end of
      non-void function [-Wreturn-type]

This function's return statement should probably have been placed
outside the #endif, so move it there

Link: ClangBuiltLinux#360
Signed-off-by: Louis Taylor <louis@kragniz.eu>
@tpimh tpimh removed the low priority label Mar 10, 2019
@nathanchance

This comment has been minimized.

Copy link
Member

@nathanchance nathanchance commented Mar 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.