I was trying a test build with these patches and got the following error

In function 'mbi2_reloc',
    inlined from 'reloc' at arch/x86/boot/reloc.c:437:16:
arch/x86/boot/reloc.c:349:20: error: 'bi_mods' may be used uninitialized [-Werror=maybe-uninitialized] 349 | bi_mods[mod_idx].start = get_mb2_data(tag, module, mod_start);
      |                    ^
arch/x86/boot/reloc.c: In function 'reloc':
arch/x86/boot/reloc.c:237:25: note: 'bi_mods' was declared here
  237 |     struct boot_module *bi_mods;
      |                         ^~~~~~~
In file included from arch/x86/boot/reloc.c:29:
In function 'mbi2_reloc',
    inlined from 'reloc' at arch/x86/boot/reloc.c:437:16:
arch/x86/boot/reloc.c:365:43: error: 'arch_bi_mods' may be used uninitialized [-Werror=maybe-uninitialized]
  365 |             bi_mods[mod_idx].arch = _addr(&arch_bi_mods[mod_idx]);
arch/x86/boot/defs.h:47:46: note: in definition of macro '_addr'
   47 | #define _addr(val)  ((unsigned long)(void *)(val))
      |                                              ^~~
arch/x86/boot/reloc.c: In function 'reloc':
arch/x86/boot/reloc.c:238:29: note: 'arch_bi_mods' was declared here
  238 |     struct arch_bootmodule *arch_bi_mods;
      |                             ^~~~~~~~~~~~
cc1: all warnings being treated as errors

Is there a problem in the code?

        Michael Young


Reply via email to