linux/tools
Jianlin Lv 067012974c perf tools: Fix arm64 build error with gcc-11
gcc version: 11.0.0 20210208 (experimental) (GCC)

Following build error on arm64:

.......
In function ‘printf’,
    inlined from ‘regs_dump__printf’ at util/session.c:1141:3,
    inlined from ‘regs__printf’ at util/session.c:1169:2:
/usr/include/aarch64-linux-gnu/bits/stdio2.h:107:10: \
  error: ‘%-5s’ directive argument is null [-Werror=format-overflow=]

107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, \
                __va_arg_pack ());

......
In function ‘fprintf’,
  inlined from ‘perf_sample__fprintf_regs.isra’ at \
    builtin-script.c:622:14:
/usr/include/aarch64-linux-gnu/bits/stdio2.h💯10: \
    error: ‘%5s’ directive argument is null [-Werror=format-overflow=]
  100 |   return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
  101 |                         __va_arg_pack ());

cc1: all warnings being treated as errors
.......

This patch fixes Wformat-overflow warnings. Add helper function to
convert NULL to "unknown".

Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: Guo Ren <guoren@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: iecedge@gmail.com
Cc: linux-csky@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Link: http://lore.kernel.org/lkml/20210218031245.2078492-1-Jianlin.Lv@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-02-18 16:24:43 -03:00
..
accounting
arch perf powerpc: Support exposing Performance Monitor Counter SPRs as part of extended regs 2021-02-08 16:25:00 -03:00
bootconfig tools/bootconfig: Add tracing_on support to helper scripts 2021-01-14 10:32:20 -05:00
bpf Merge remote-tracking branch 'torvalds/master' into perf/core 2021-01-20 14:35:31 -03:00
build perf cs-etm: Update ARM's CoreSight hardware tracing OpenCSD library to v1.0.0 2021-01-20 14:34:20 -03:00
cgroup
debugging docs: Update documentation to reflect what TAINT_CPU_OUT_OF_SPEC means 2020-12-08 10:53:58 -07:00
edid
firewire
firmware
gpio tools: gpio: fix %llu warning in gpio-watch.c 2021-01-18 10:05:35 +01:00
hv
iio
include Merge branch 'perf/urgent' into perf/core 2021-02-16 11:52:16 -03:00
io_uring tools/io_uring: fix compile breakage 2020-09-21 07:50:58 -06:00
kvm/kvm_stat tools/kvm_stat: Exempt time-based counters 2020-12-11 19:18:51 -05:00
laptop
leds
lib tools api fs: Cache cgroupfs mount point 2021-02-17 15:09:08 -03:00
memory-model tools/memory-model: Label MP tests' producers and consumers 2020-11-06 17:25:17 -08:00
objtool objtool: Don't fail on missing symbol table 2021-01-21 15:49:58 -06:00
pci
pcmcia
perf perf tools: Fix arm64 build error with gcc-11 2021-02-18 16:24:43 -03:00
power tools/power/turbostat: Fallback to an MSR read for EPB 2021-02-03 11:58:19 +01:00
scripts perf build: Support build BPF skeletons with perf 2021-01-15 15:49:07 -03:00
spi
testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-02-10 11:33:39 -08:00
thermal/tmon
time
usb
virtio tools/virtio: add barrier for aarch64 2020-12-18 16:14:30 -05:00
vm
wmi
Makefile