From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id B641D7EB0 for ; Tue, 4 Aug 2015 16:29:23 +0200 (CEST) Received: by wibud3 with SMTP id ud3so26474660wib.0 for ; Tue, 04 Aug 2015 07:29:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+CsidV8NS8VOHIiJHnZHQUwDmHYl+a/bN9wmOBAcHqw=; b=jQoXT7VKc1UqSbg97KleEmHBGr0sEYcPDs2YPgWgpBg2sPQLfyHEIngd7dCyf1ckLQ lC7cD3D5qivMqF+T23H8mANuLBG3lNpLjh9WBJ0nX3otknPAdetOwzFMlZ6Y+fNlpyIY b0qHmcMFuJzesjwrlo/SL6Ebf7+X/SKfl0lEp0ntl+bfILioKmst7QZ+Qsc6iHCfOXYV 8ivX8Fi8r0UxnGO5/Ae+gqMuNrdKzoWym64LXNC3i0B6kkVDIaxofpojzcltwNDY80Kk O0edmAloKQ8gw5/dDzKwBKplSKinUpkgvWgmUPSuFfe+ARX8cqqKBBl75mCR8afT0K2n XcCw== X-Gm-Message-State: ALoCoQlK6133Dq96/498w0ndzKJNdEMsBqPMojEedNEXAlnRMGjoZuQN20a1PmFF4bXfdyvkuyue X-Received: by 10.180.187.193 with SMTP id fu1mr33633017wic.75.1438698563558; Tue, 04 Aug 2015 07:29:23 -0700 (PDT) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id y13sm2139125wjq.26.2015.08.04.07.29.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Aug 2015 07:29:22 -0700 (PDT) From: Thomas Monjalon To: Stephen Hemminger Date: Tue, 4 Aug 2015 16:27:45 +0200 Message-Id: <1438698465-27834-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.4.2 Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH] pci: fix bsd build with gcc 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: Tue, 04 Aug 2015 14:29:23 -0000 GCC 4.8 raises this error: lib/librte_eal/bsdapp/eal/eal_pci.c:453:15: error: cast discards '__attribute__((const))' qualifier from pointer target type .pi_data = *(u_int32_t *)buf, ^ Note: this assignment seems useless because pi_data is filled with memset later. Fixes: 632b2d1deeed ("eal: provide functions to access PCI config") Signed-off-by: Thomas Monjalon --- lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 6fa0d08..6c21fbd 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -450,7 +450,7 @@ int rte_eal_pci_write_config(const struct rte_pci_device *dev, .pc_func = dev->addr.function, }, .pi_reg = offset, - .pi_data = *(u_int32_t *)buf, + .pi_data = *(const uint32_t *)buf, .pi_width = len, }; -- 2.4.2