From patchwork Wed Jan 2 13:13:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 10746331 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19C6A91E for ; Wed, 2 Jan 2019 13:14:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08CDA28450 for ; Wed, 2 Jan 2019 13:14:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0FE6285A3; Wed, 2 Jan 2019 13:13:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9976528450 for ; Wed, 2 Jan 2019 13:13:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729897AbfABNN7 (ORCPT ); Wed, 2 Jan 2019 08:13:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42546 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726939AbfABNN7 (ORCPT ); Wed, 2 Jan 2019 08:13:59 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 425279D43E; Wed, 2 Jan 2019 13:13:59 +0000 (UTC) Received: from localhost (ovpn-12-97.pek2.redhat.com [10.72.12.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9639E608DC; Wed, 2 Jan 2019 13:13:58 +0000 (UTC) From: Honggang Li To: hal@dev.mellanox.co.il Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [ibsim patch 05/23] =?utf-8?b?c2ltX2NtZC5jOiBmaXgg4oCYb3JpZ+KAmSBt?= =?utf-8?b?YXkgYmUgdXNlZCB1bmluaXRpYWxpemVk?= Date: Wed, 2 Jan 2019 21:13:00 +0800 Message-Id: <20190102131318.5765-5-honli@redhat.com> In-Reply-To: <20190102131318.5765-1-honli@redhat.com> References: <20190102131318.5765-1-honli@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 02 Jan 2019 13:13:59 +0000 (UTC) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -Wall -g -Werror -Wno-deprecated-declarations -fpic -I. -I../include -I/usr/include -c -o sim_cmd.o sim_cmd.c sim_cmd.c: In function ‘do_cmd’: sim_cmd.c:911:11: error: ‘orig’ may be used uninitialized in this function [-Werror=maybe-uninitialized] nodeid = expand_name(orig, name, &sp); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ sim_cmd.c:897:19: note: ‘orig’ was declared here char *s = line, *orig, *sp, *nodeid, *attr, *field, *field_trim, *end_ptr; Signed-off-by: Honggang Li --- ibsim/sim_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibsim/sim_cmd.c b/ibsim/sim_cmd.c index 92343525645b..fa5ff9baea6b 100644 --- a/ibsim/sim_cmd.c +++ b/ibsim/sim_cmd.c @@ -894,7 +894,7 @@ static int parse_vl_num(char *attr, char *field, int *vl) static int do_perf_counter_set(FILE *f, char *line) { - char *s = line, *orig, *sp, *nodeid, *attr, *field, *field_trim, *end_ptr; + char *s = line, *orig = NULL, *sp, *nodeid, *attr, *field, *field_trim, *end_ptr; Node *node; int portnum, vl; uint64_t value;