kpatch/kpatch-build
Josh Poimboeuf c6763e218f lookup: silence maybe-uninitialized warnings for -O2
When compiling with -O2, it fails with:

  gcc -MMD -MP -O2 -I../kmod/patch -Iinsn -Wall -g -Werror -c -o lookup.o lookup.c
  lookup.c: In function ‘lookup_open’:
  lookup.c:132:21: error: ‘file_sym’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     table->local_syms = file_sym;
     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
  lookup.c:83:30: note: ‘file_sym’ was declared here
    struct object_symbol *sym, *file_sym;
                                ^~~~~~~~
  lookup.c:129:27: error: ‘child_sym’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if (in_file && !child_sym->name) {
                    ~~~~~~~~~^~~~~~
  lookup.c:85:27: note: ‘child_sym’ was declared here
    struct sym_compare_type *child_sym;
                             ^~~~~~~~~
  cc1: all warnings being treated as errors
  Makefile:17: recipe for target 'lookup.o' failed
  make[1]: *** [lookup.o] Error 1
  make[1]: Leaving directory '/home/jpoimboe/git/kpatch/kpatch-build'
  Makefile:14: recipe for target 'build-kpatch-build' failed
  make: *** [build-kpatch-build] Error 2

As far as I can tell, these are false positive warnings.  When in_file
is 1, file_sym and child_sym are properly initialized.  But silence the
warnings anyway so Gentoo users can build with -O2.

Fixes: #675
2017-06-05 11:11:55 -05:00
..
insn insn: get it to compile in create-diff-object 2014-05-30 15:19:57 -05:00
create-diff-object.c create-diff-object: don't create dynrelas for exported vmlinux symbols used by modules 2017-04-20 16:56:43 -05:00
create-klp-module.c create-klp-module: add new program that creates patch modules that have klp elements 2017-01-23 12:43:31 -08:00
create-kpatch-module.c create-kpatch-module: add new program that creates kpatch modules 2017-01-23 12:43:34 -08:00
kpatch-build kpatch-build: retrieve source package instead of linux-source 2017-05-17 23:24:32 +02:00
kpatch-elf.c elf: add .eh_frame* sections to debug section list 2017-05-11 14:02:08 -05:00
kpatch-elf.h kpatch-elf: add find_rela_by_offset() 2017-01-23 12:43:27 -08:00
kpatch-gcc kpatch-gcc: update ignorelist to avoid foo/.lib_exports.o files 2017-03-10 10:26:06 -05:00
kpatch-intermediate.h kpatch-intermediate.h: fix comments 2017-01-23 22:42:25 -08:00
list.h new .fixup group size algorithm 2014-09-15 14:54:57 -05:00
log.h log: include error.h 2017-01-23 12:42:35 -08:00
lookup.c lookup: silence maybe-uninitialized warnings for -O2 2017-06-05 11:11:55 -05:00
lookup.h support dup file+symbol 2017-02-04 09:37:18 +08:00
Makefile create-kpatch-module: add new program that creates kpatch modules 2017-01-23 12:43:34 -08:00