net: explicit cast of protocol in IPv6 checksum
authorAndy Green <andy@warmcat.com>
Thu, 17 May 2018 13:50:17 +0000 (21:50 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 20 May 2018 22:21:34 +0000 (00:21 +0200)
commit8bf255bb3862d8f35496b26bc8c2511239bdc18b
tree779ba0f51134535ff838a7ecf480c0c66d5e120e
parent466de6d5d8648f6a2c6cfc90c2d1bf217dd06e90
net: explicit cast of protocol in IPv6 checksum

GCC 8.1 warned:

In function 'rte_ipv6_phdr_cksum':
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);

Fixes: 6006818cfb26 ("net: new checksum functions")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
lib/librte_net/rte_ip.h