tools lib traceevent: No need to check for < 0 on an unsigned enum
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 9 Nov 2012 18:42:26 +0000 (15:42 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 9 Nov 2012 20:35:15 +0000 (17:35 -0300)
commite46466b8bd5918626250dc0d6cb6c2147a611087
treed63153da5d22ab7387a0ba3b6c754925e5a8fc66
parent8a38cce4c900307e947eda774f844caf5b9a7083
tools lib traceevent: No need to check for < 0 on an unsigned enum

gcc on f14 32-bit complains:

  tools/lib/traceevent/event-parse.c: In function ‘pevent_register_print_function’:
  tools/lib/traceevent/event-parse.c:5366:3: error: comparison of unsigned expression < 0 is always false

This is because:

          enum pevent_func_arg_type type;

this enum doesn't have any negative value, so gcc makes it an 'unsigned
int'. Fix it by removing the < 0 test.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-6vnd6ud6fbpn48zax4a5ru01@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c