aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/tracepoint.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-04-19 17:10:27 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-04-19 17:10:27 -0400
commitd2802d0739dcc61af5e5ea00773ce7ddead4e9c2 (patch)
tree29d27970f8830dabeea7647479cc4bf9adda5929 /kernel/tracepoint.c
parenttracing: Remove obsolete macro guard _TRACE_PROFILE_INIT (diff)
downloadlinux-dev-d2802d0739dcc61af5e5ea00773ce7ddead4e9c2.tar.xz
linux-dev-d2802d0739dcc61af5e5ea00773ce7ddead4e9c2.zip
tracing: Compare to 1 instead of zero for is_signed_type()
The formats of the trace events show if the type of a event field is signed or not via a macro called is_signed_type(). This does a trick with the type and compares a -1 to zero after typecasting to the tested type. If it returns true, it's signed, otherwise its not. But this unfortunately triggers a warning by gcc: warning: comparison of unsigned expression < 0 is always false As we know it is always false (that's why we do it), this is a false warning. Luckily for us, the comparison works with a 1 as well, without giving the warning. Convert the check to compare (type)-1 < (type)0 to (type)-1 < (type)1 to determine if the type is signed or not. Link: http://lkml.kernel.org/r/CAErSpo4YXcY9fuOKWYGDkddJwk68kmZTohsmVB6QvrhjboOh1Q@mail.gmail.com Reported-by: Bjorn Helgaas <bhelgaas@google.com> Reported-by: Gary Hade <garyhade@us.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/tracepoint.c')
0 files changed, 0 insertions, 0 deletions