linux/tools/lib/traceevent
Adrian Hunter 0631ca3a6e tools lib traceevent: Fix compile warnings in tools/lib/traceevent/event-parse.c
Fix following warnings:

  event-parse.c: In function ‘tep_find_event_by_name’:
  event-parse.c:3521:21: warning: ‘event’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    pevent->last_event = event;
    ~~~~~~~~~~~~~~~~~~~^~~~~~~
    CC       ui/gtk/hists.o
    LINK     plugin_mac80211.so
    CC       nlattr.o
  event-parse.c: In function ‘tep_data_lat_fmt’:
  event-parse.c:5200:4: warning: ‘migrate_disable’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      trace_seq_printf(s, "%d", migrate_disable);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  event-parse.c:5207:4: warning: ‘lock_depth’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      trace_seq_printf(s, "%d", lock_depth);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    LINK     plugin_sched_switch.so
    LINK     plugin_function.so
    LINK     plugin_xen.so
  event-parse.c: In function ‘tep_event_info’:
  event-parse.c:5047:7: warning: ‘len_arg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         trace_seq_printf(s, format, len_arg, (char)val);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  event-parse.c:4884:6: note: ‘len_arg’ was declared here
    int len_arg;
        ^~~~~~~
  event-parse.c:4338:11: warning: ‘vsize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       val = tep_read_number(pevent, bptr, vsize);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  event-parse.c:4224:6: note: ‘vsize’ was declared here
    int vsize;
        ^~~~~

$ gcc --version
  gcc (Clear Linux OS for Intel Architecture) 8.2.1 20180502

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Link: http://lkml.kernel.org/r/20181122112937.10582-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-12-17 14:54:21 -03:00
..
.gitignore tools lib traceevent: Ignore generated library files 2016-08-02 12:16:13 -03:00
Build tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file 2018-10-08 15:05:37 -03:00
event-parse-api.c tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file 2018-10-08 15:05:37 -03:00
event-parse-local.h tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file 2018-10-08 15:05:37 -03:00
event-parse.c tools lib traceevent: Fix compile warnings in tools/lib/traceevent/event-parse.c 2018-12-17 14:54:21 -03:00
event-parse.h tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file 2018-10-08 15:05:37 -03:00
event-plugin.c tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file 2018-10-08 15:05:37 -03:00
event-utils.h tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00
kbuffer-parse.c tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00
kbuffer.h tools lib traceevent: Add way to find sub buffer boundary 2015-03-24 12:22:09 -03:00
Makefile tools lib traceevent, tools lib lockdep: Rename 'enum pevent_errno' to 'enum tep_errno' 2018-08-13 15:23:07 -03:00
parse-filter.c tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file 2018-10-08 15:05:37 -03:00
parse-utils.c tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00
plugin_cfg80211.c tools lib traceevent: Rename pevent_register / unregister APIs 2018-08-13 15:27:35 -03:00
plugin_function.c tools lib traceevent, perf tools: Rename struct event_format to struct tep_event_format 2018-09-19 17:11:50 -03:00
plugin_hrtimer.c tools lib traceevent, perf tools: Rename struct event_format to struct tep_event_format 2018-09-19 17:11:50 -03:00
plugin_jbd2.c tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file 2018-08-30 15:52:20 -03:00
plugin_kmem.c tools lib traceevent, perf tools: Rename struct format{_field} to struct tep_format{_field} 2018-09-19 17:13:15 -03:00
plugin_kvm.c tools lib traceevent, perf tools: Rename struct event_format to struct tep_event_format 2018-09-19 17:11:50 -03:00
plugin_mac80211.c tools lib traceevent, perf tools: Rename struct format{_field} to struct tep_format{_field} 2018-09-19 17:13:15 -03:00
plugin_sched_switch.c tools lib traceevent, perf tools: Rename struct format{_field} to struct tep_format{_field} 2018-09-19 17:13:15 -03:00
plugin_scsi.c tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file 2018-08-30 15:52:20 -03:00
plugin_xen.c tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file 2018-08-30 15:52:20 -03:00
tep_strerror.c tools lib traceevent: Separate out tep_strerror() for strerror_r() issues 2018-10-08 14:30:45 -03:00
trace-seq.c tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file 2018-08-30 15:52:20 -03:00
trace-seq.h tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file 2018-08-30 15:52:20 -03:00