From patchwork Wed Aug 22 12:00:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tzvetomir Stoyanov (VMware)" X-Patchwork-Id: 10759131 Return-Path: Received: from mail-wr1-f68.google.com ([209.85.221.68]:36829 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728356AbeHVPZK (ORCPT ); Wed, 22 Aug 2018 11:25:10 -0400 Received: by mail-wr1-f68.google.com with SMTP id m27-v6so1400661wrf.3 for ; Wed, 22 Aug 2018 05:00:32 -0700 (PDT) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH] tools/lib/traceevent: Fixed few compiler warnings Date: Wed, 22 Aug 2018 15:00:29 +0300 Message-Id: <20180822120029.3584-1-tz.stoyanov@gmail.com> Sender: linux-trace-devel-owner@vger.kernel.org List-ID: Content-Length: 1586 Fixed compiler warnings reported by the "-Wmaybe-uninitialized" gcc flag. All of them are false alarms, this change is just to make compiler happy. Signed-off-by: Tzvetomir Stoyanov (VMware) --- tools/lib/traceevent/event-parse.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index aabd7516bafd..ab15b985c047 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -3512,7 +3512,7 @@ struct tep_event_format * tep_find_event_by_name(struct tep_handle *pevent, const char *sys, const char *name) { - struct tep_event_format *event; + struct tep_event_format *event = NULL; int i; if (pevent->last_event && @@ -4235,7 +4235,7 @@ static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, s unsigned long long ip, val; char *ptr; void *bptr; - int vsize; + int vsize = 0; field = pevent->bprint_buf_field; ip_field = pevent->bprint_ip_field; @@ -4895,7 +4895,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct tep_e char format[32]; int show_func; int len_as_arg; - int len_arg; + int len_arg = -1; int len; int ls; @@ -5160,8 +5160,8 @@ void tep_data_lat_fmt(struct tep_handle *pevent, static int migrate_disable_exists; unsigned int lat_flags; unsigned int pc; - int lock_depth; - int migrate_disable; + int lock_depth = -1; + int migrate_disable = -1; int hardirq; int softirq; void *data = record->data;