From patchwork Fri Jul 14 09:59:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 107757 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp680203qge; Fri, 14 Jul 2017 03:01:05 -0700 (PDT) X-Received: by 10.55.69.66 with SMTP id s63mr10292278qka.229.1500026465745; Fri, 14 Jul 2017 03:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500026465; cv=none; d=google.com; s=arc-20160816; b=0NN7A5US6sa5H+zsugXcAMhex7DWcil/XNeralKHiizdUatDR/EBPAedDUaRUc6uN8 vyvWZ9jtnRizI4D0GuW19ZkizRbsPMzzJBengNol7zGy8Fhtcbyv8Biuo7KSItG6gfMo mOogkMJBraHhE7ty6hBZoykDfVQ/gP0TYsbm1FgDGuZ7d0PpWe/TmzTR7eRnxMN0sWoc 1vVVQJzBdH45+YMGAw3hxyTpJotOluHLT20Y586J1xqemmt2/EjRPMN8CufbcaHUOXts Az5mbgaqYNPVH/0C4TtxkpnN1nv3S7cGfo9k6x0DCyNsUvTr16zmQRRz/c/TJWa1c+oB dgmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=LIbt8f1wytO0cVeJ+Ja+S3mogfaAIKvE+fAhT7cdbjI=; b=LkLnfs3LBzyig7I798gtqpg6VMFk22LZ0HdkyYqcnfZMQdsTioPkmhSgVMMuTg1I0u n1Nb1WfYry3igS2rApPPZwF42y9bxNEQ5KDQSVbYgYe8rSrgFsXdgV6xQpjyheegXzcG udv9hLoiik8I6K9E8X7JjMpHIi3XT5wI+XJDWEZb4ldaIhofFNYuEpcif0BigfT4kVre F/wap/SSbvLTzUYSKSk4hQF1QYzHJO5QkvK2+FHsiPI21zUMkrUEVUv6IfwW3WMa4Sp+ qn51/F/02TINfst9gOaQM0vBHwgHeiJMFe5w0mkKcVKtb7pk734aJEBPNTT1gWUy7x1I H31Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j54si7420442qtc.20.2017.07.14.03.01.05; Fri, 14 Jul 2017 03:01:05 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 700E060805; Fri, 14 Jul 2017 10:01:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 055EA60870; Fri, 14 Jul 2017 10:00:29 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E225160663; Fri, 14 Jul 2017 10:00:24 +0000 (UTC) Received: from forward4j.cmail.yandex.net (forward4j.cmail.yandex.net [5.255.227.22]) by lists.linaro.org (Postfix) with ESMTPS id 63BED60663 for ; Fri, 14 Jul 2017 10:00:23 +0000 (UTC) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::27]) by forward4j.cmail.yandex.net (Yandex) with ESMTP id 8FCEB20F8C for ; Fri, 14 Jul 2017 13:00:21 +0300 (MSK) Received: from smtp3o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3o.mail.yandex.net (Yandex) with ESMTP id 929232940C4D for ; Fri, 14 Jul 2017 13:00:19 +0300 (MSK) Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id eQMe5PKgI5-0JoCCPC1; Fri, 14 Jul 2017 13:00:19 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 14 Jul 2017 12:59:57 +0300 Message-Id: <1500026405-14155-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1500026405-14155-1-git-send-email-odpbot@yandex.ru> References: <1500026405-14155-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 77 Subject: [lng-odp] [PATCH v1 1/9] bug: linux-generic: add syntax to allow newer clang to compile odp X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bill Fischofer Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2942 by adding casts needed to avoid compilation failures when using clang 4.0.0 included in Ubuntu 17.04, which is stricter than clang 3.8.1 which is in Ubuntu 16.10. Signed-off-by: Bill Fischofer Signed-off-by: Maxim Uvarov --- /** Email created from pull request 77 (muvarov:monarch_lts) ** https://github.com/Linaro/odp/pull/77 ** Patch: https://github.com/Linaro/odp/pull/77.patch ** Base sha: 0c15c40db40834f1df217191c4b6a06303ab0872 ** Merge commit sha: f06a7319a03ad565ced026ddc76a66164aa93782 **/ helper/chksum.c | 6 +++--- platform/linux-generic/odp_packet_flags.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helper/chksum.c b/helper/chksum.c index 8f188814..772abcd2 100644 --- a/helper/chksum.c +++ b/helper/chksum.c @@ -122,7 +122,7 @@ static inline int odph_process_l4_hdr(odp_packet_t odp_pkt, * should come from the udp header, unlike for TCP where is * derived. */ l4_len = odp_be_to_cpu_16(udp_hdr_ptr->length); - pkt_chksum_ptr = &udp_hdr_ptr->chksum; + pkt_chksum_ptr = (uint16_t *)(void *)&udp_hdr_ptr->chksum; pkt_chksum_offset = l4_offset + offsetof(odph_udphdr_t, chksum); } else if (odp_packet_has_tcp(odp_pkt)) { tcp_hdr_ptr = (odph_tcphdr_t *)l4_ptr; @@ -133,7 +133,7 @@ static inline int odph_process_l4_hdr(odp_packet_t odp_pkt, tcp_hdr_ptr = &tcp_hdr; } - pkt_chksum_ptr = &tcp_hdr_ptr->cksm; + pkt_chksum_ptr = (uint16_t *)(void *)&tcp_hdr_ptr->cksm; pkt_chksum_offset = l4_offset + offsetof(odph_tcphdr_t, cksm); is_tcp = true; } else { @@ -197,7 +197,7 @@ static inline int odph_process_l3_hdr(odp_packet_t odp_pkt, ipv4_hdr_ptr = &ipv4_hdr; } - addrs_ptr = (uint16_t *)&ipv4_hdr_ptr->src_addr; + addrs_ptr = (uint16_t *)(void *)&ipv4_hdr_ptr->src_addr; addrs_len = 2 * ODPH_IPV4ADDR_LEN; protocol = ipv4_hdr_ptr->proto; l3_len = odp_be_to_cpu_16(ipv4_hdr_ptr->tot_len); diff --git a/platform/linux-generic/odp_packet_flags.c b/platform/linux-generic/odp_packet_flags.c index b88324c1..fc0bc1d2 100644 --- a/platform/linux-generic/odp_packet_flags.c +++ b/platform/linux-generic/odp_packet_flags.c @@ -18,7 +18,7 @@ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt); \ if (packet_parse_not_complete(pkt_hdr)) \ packet_parse_full(pkt_hdr); \ - pkt_hdr->p.x = v & 1; \ + pkt_hdr->p.x = (v) & 1; \ } while (0) int odp_packet_has_error(odp_packet_t pkt)