linux/arch/x86/tools
Markus Trippelsdorf 7ebb916782 x86/tools: Fix gcc-7 warning in relocs.c
gcc-7 warns:

In file included from arch/x86/tools/relocs_64.c:17:0:
arch/x86/tools/relocs.c: In function ‘process_64’:
arch/x86/tools/relocs.c:953:2: warning: argument 1 null where non-null expected [-Wnonnull]
  qsort(r->offset, r->count, sizeof(r->offset[0]), cmp_relocs);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/tools/relocs.h:6:0,
                 from arch/x86/tools/relocs_64.c:1:
/usr/include/stdlib.h:741:13: note: in a call to function ‘qsort’ declared here         
 extern void qsort 

This happens because relocs16 is not used for ELF_BITS == 64, 
so there is no point in trying to sort it.

Make the sort_relocs(&relocs16) call 32bit only.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Link: http://lkml.kernel.org/r/20161215124513.GA289@x4
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-12-19 11:50:24 +01:00
..
.gitignore x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF 2013-04-16 16:02:58 -07:00
chkobjdump.awk x86: Fix objdump version check in chkobjdump.awk for different formats. 2009-12-18 09:26:56 -08:00
distill.awk x86: Show symbol name if insn decoder test failed 2009-11-17 07:16:50 +01:00
gen-insn-attr-x86.awk x86/insn: Add AVX-512 support to the instruction decoder 2016-07-21 09:37:11 -03:00
insn_sanity.c x86/decoder: Use stderr if insn sanity test fails 2016-10-26 08:41:06 +02:00
Makefile x86/build: Supress "Nothing to be done for ..." messages 2014-04-14 11:44:36 +02:00
relocs_32.c x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF 2013-04-16 16:02:58 -07:00
relocs_64.c x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF 2013-04-16 16:02:58 -07:00
relocs_common.c x86, relocs: Add manual debug mode 2014-01-22 04:21:45 -08:00
relocs.c x86/tools: Fix gcc-7 warning in relocs.c 2016-12-19 11:50:24 +01:00
relocs.h x86/build: Annotate die() with noreturn to fix build warning on clang 2016-11-28 07:47:22 +01:00
test_get_len.c x86/decoder: Use stdout if insn decoder test is successful 2016-10-26 08:41:06 +02:00