• Adrian Hunter's avatar
    tools lib traceevent: Fix compile warnings in tools/lib/traceevent/event-parse.c · 7dd70b09
    Adrian Hunter authored
    [ Upstream commit 0631ca3a ]
    
    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: 's avatarAdrian 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.comSigned-off-by: 's avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    7dd70b09
Name
Last commit
Last update
..
.gitignore Loading commit data...
Build Loading commit data...
Makefile Loading commit data...
event-parse-api.c Loading commit data...
event-parse-local.h Loading commit data...
event-parse.c Loading commit data...
event-parse.h Loading commit data...
event-plugin.c Loading commit data...
event-utils.h Loading commit data...
kbuffer-parse.c Loading commit data...
kbuffer.h Loading commit data...
parse-filter.c Loading commit data...
parse-utils.c Loading commit data...
plugin_cfg80211.c Loading commit data...
plugin_function.c Loading commit data...
plugin_hrtimer.c Loading commit data...
plugin_jbd2.c Loading commit data...
plugin_kmem.c Loading commit data...
plugin_kvm.c Loading commit data...
plugin_mac80211.c Loading commit data...
plugin_sched_switch.c Loading commit data...
plugin_scsi.c Loading commit data...
plugin_xen.c Loading commit data...
tep_strerror.c Loading commit data...
trace-seq.c Loading commit data...
trace-seq.h Loading commit data...