From patchwork Wed Jan 2 13:13:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 10746333 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 BDAA5746 for ; Wed, 2 Jan 2019 13:14:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD4AC284A5 for ; Wed, 2 Jan 2019 13:14:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A19E7285FB; Wed, 2 Jan 2019 13:14:03 +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 5C6C1284A5 for ; Wed, 2 Jan 2019 13:14:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729899AbfABNOD (ORCPT ); Wed, 2 Jan 2019 08:14:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50152 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726939AbfABNOD (ORCPT ); Wed, 2 Jan 2019 08:14:03 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED5007E9FB; Wed, 2 Jan 2019 13:14:02 +0000 (UTC) Received: from localhost (ovpn-12-97.pek2.redhat.com [10.72.12.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 43C845D757; Wed, 2 Jan 2019 13:14:01 +0000 (UTC) From: Honggang Li To: hal@dev.mellanox.co.il Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [ibsim patch 06/23] sim_mad.c: fix a clang compilation error Date: Wed, 2 Jan 2019 21:13:01 +0800 Message-Id: <20190102131318.5765-6-honli@redhat.com> In-Reply-To: <20190102131318.5765-1-honli@redhat.com> References: <20190102131318.5765-1-honli@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 02 Jan 2019 13:14:03 +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 sim_mad.c:160:13: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] [TRAP_128] encode_trap128, ^ = sim_mad.c:161:13: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] [TRAP_144] encode_trap144, ^ = sim_mad.c:163:18: error: use of GNU 'missing =' extension in designator [-Werror,-Wgnu-designator] [TRAP_NUM_LAST] 0, ^ = Signed-off-by: Honggang Li --- ibsim/sim_mad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ibsim/sim_mad.c b/ibsim/sim_mad.c index edb23952b47a..1660b84dbe4b 100644 --- a/ibsim/sim_mad.c +++ b/ibsim/sim_mad.c @@ -157,10 +157,10 @@ static Smpfn * get_smp_handler(unsigned class_id, unsigned attr_id) } static EncodeTrapfn *encodetrap[] = { - [TRAP_128] encode_trap128, - [TRAP_144] encode_trap144, + [TRAP_128] = encode_trap128, + [TRAP_144] = encode_trap144, - [TRAP_NUM_LAST] 0, + [TRAP_NUM_LAST] = 0, }; extern Node *nodes;