diff options
author | Nathan Chancellor <[email protected]> | 2020-02-19 22:10:12 -0700 |
---|---|---|
committer | Steven Rostedt (VMware) <[email protected]> | 2020-03-19 16:27:41 -0400 |
commit | bf2cbe044da275021b2de5917240411a19e5c50d (patch) | |
tree | f604464450bf9533e0685cb7965cb5e23070ce21 /kernel/trace/trace_output.c | |
parent | bbd9d05618a6d608c72640b1d3d651a75913456a (diff) |
tracing: Use address-of operator on section symbols
Clang warns:
../kernel/trace/trace.c:9335:33: warning: array comparison always
evaluates to true [-Wtautological-compare]
if (__stop___trace_bprintk_fmt != __start___trace_bprintk_fmt)
^
1 warning generated.
These are not true arrays, they are linker defined symbols, which are
just addresses. Using the address of operator silences the warning and
does not change the runtime result of the check (tested with some print
statements compiled in with clang + ld.lld and gcc + ld.bfd in QEMU).
Link: http://lkml.kernel.org/r/[email protected]
Link: https://github.com/ClangBuiltLinux/linux/issues/893
Suggested-by: Nick Desaulniers <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'kernel/trace/trace_output.c')
0 files changed, 0 insertions, 0 deletions