From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by dpdk.org (Postfix) with ESMTP id B51CFE82 for ; Fri, 3 Oct 2014 22:58:42 +0200 (CEST) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail.windriver.com (8.14.9/8.14.5) with ESMTP id s93L5bkb012732 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Fri, 3 Oct 2014 14:05:37 -0700 (PDT) Received: from ALA-MBB.corp.ad.wrs.com ([169.254.1.18]) by ALA-HCB.corp.ad.wrs.com ([147.11.189.41]) with mapi id 14.03.0174.001; Fri, 3 Oct 2014 14:05:37 -0700 From: "Wiles, Roger Keith" To: "" Thread-Topic: Clang reporting a problem when adding another member initialization. Thread-Index: AQHP303HbE41InrtOE6yUXIho4CZNw== Date: Fri, 3 Oct 2014 21:05:36 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.40.166] Content-Type: text/plain; charset="Windows-1252" Content-ID: <087288B61E573449A9E52DAE92785CA9@local> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [dpdk-dev] Clang reporting a problem when adding another member initialization. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 20:58:43 -0000 I run into a problem with Clang report problem when I tried to add another = member to the static initializer of the following in file ixgbe_rxtx_vec.c int ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq) { static struct rte_mbuf mb_def =3D { .nb_segs =3D 1, .data_off =3D RTE_PKTMBUF_HEADROOM, .reserved2 =3D 0x5555, #ifdef RTE_MBUF_REFCNT { .refcnt =3D 1, } #endif }; =3D=3D Build lib/librte_pmd_ixgbe CC ixgbe_rxtx_vec.o /home/keithw/projects/dpdk-code/dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:= 739:5: error: designator in initializer for scalar type 'uint16_t' (aka 'un= signed short') { .refcnt =3D 1, } ^~~~~~~~~~~ 1 error generated. I moved the =91,=92 in the { } to outside and still the same problem. int ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq) { static struct rte_mbuf mb_def =3D { .nb_segs =3D 1, .data_off =3D RTE_PKTMBUF_HEADROOM, .reserverd2 =3D (uint16_t)0x5555, #ifdef RTE_MBUF_REFCNT { .refcnt =3D 1 }, #endif }; =3D=3D Build lib/librte_pmd_ixgbe CC ixgbe_rxtx_vec.o /home/keithw/projects/dpdk-code/dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:= 739:5: error: designator in initializer for scalar type 'uint16_t' (aka 'un= signed short') { .refcnt =3D 1 }, ^~~~~~~~~~~ 1 error generated. Without adding the =91.reserved2 =3D 0x5555,=92 it builds. int ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq) { static struct rte_mbuf mb_def =3D { .nb_segs =3D 1, .data_off =3D RTE_PKTMBUF_HEADROOM, .reserverd2 =3D (uint16_t)0x5555, #ifdef RTE_MBUF_REFCNT .refcnt =3D 1, #endif }; Then I removed the {} and it now builds. Is this a result of the changes to= the mbuf structure and Clang being picky? Should I submit a patch to remove the =91{ }=92 values? Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-= 213-5533