New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 827768 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

warning building 4.4 kernel for eve

Project Member Reported by kirtika@chromium.org, Mar 31 2018

Issue description

This seems a recent regression, but a git blame/log on relocs.c or relocs_64.c didn't tell me anything about the source. 

HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/empty.o
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/selinux/genheaders/genheaders
In file included from /mnt/host/source/src/third_party/kernel/v4.4/arch/x86/tools/relocs_64.c:17:
/mnt/host/source/src/third_party/kernel/v4.4/arch/x86/tools/relocs.c:980:6: warning: variable 'do_reloc' is used uninitialized whenever 'if'
      condition is false [-Wsometimes-uninitialized]
        if (!use_real_mode)
            ^~~~~~~~~~~~~~
/mnt/host/source/src/third_party/kernel/v4.4/arch/x86/tools/relocs.c:992:14: note: uninitialized use occurs here
        walk_relocs(do_reloc);
                    ^~~~~~~~
/mnt/host/source/src/third_party/kernel/v4.4/arch/x86/tools/relocs.c:980:2: note: remove the 'if' if its condition is always true
        if (!use_real_mode)
        ^~~~~~~~~~~~~~~~~~~
/mnt/host/source/src/third_party/kernel/v4.4/arch/x86/tools/relocs.c:977:24: note: initialize the variable 'do_reloc' to silence this
      warning
                        const char *symname);
                                            ^
 

Comment 1 by groeck@chromium.org, Mar 31 2018

Did you look into the code ? The "uninitialized" use is preceded by a call to a function named "die()".

The warning is "caused" by the use of clang. See upstream commit adee8705d2517f0 ("x86/build: Annotate die() with noreturn to fix build warning on clang").

Sign in to add a comment