From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 23FA91C712 for ; Mon, 14 May 2018 07:11:27 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Mon, 14 May 2018 13:11:23 +0800 Message-ID: <152627468326.53156.6346926741702207560.stgit@localhost.localdomain> In-Reply-To: <152627436523.53156.4398253089110011263.stgit@localhost.localdomain> References: <152627436523.53156.4398253089110011263.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [PATCH v4 23/23] rte_ip.h: cast away gcc8 warning on rte_ipv6_phdr_cksum X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2018 05:11:27 -0000 /projects/lagopus/src/dpdk/build/include/rte_ip.h: In function 'rte_ipv6_phdr_cksum': /projects/lagopus/src/dpdk/build/include/rte_ip.h: 378:18: warning: conversion to 'uint32_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] psd_hdr.proto = (ipv6_hdr->proto << 24); Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index c46398548..72dc2456a 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/librte_net/rte_ip.h @@ -375,7 +375,7 @@ rte_ipv6_phdr_cksum(const struct ipv6_hdr *ipv6_hdr, uint64_t ol_flags) uint32_t proto; /* L4 protocol - top 3 bytes must be zero */ } psd_hdr; - psd_hdr.proto = (ipv6_hdr->proto << 24); + psd_hdr.proto = (uint32_t)(ipv6_hdr->proto << 24); if (ol_flags & PKT_TX_TCP_SEG) { psd_hdr.len = 0; } else {