mirror of
https://github.com/dynup/kpatch
synced 2025-01-05 04:29:31 +00:00
c6763e218f
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 |
||
---|---|---|
.. | ||
insn | ||
create-diff-object.c | ||
create-klp-module.c | ||
create-kpatch-module.c | ||
kpatch-build | ||
kpatch-elf.c | ||
kpatch-elf.h | ||
kpatch-gcc | ||
kpatch-intermediate.h | ||
list.h | ||
log.h | ||
lookup.c | ||
lookup.h | ||
Makefile |