From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5C55D805D for ; Mon, 1 Dec 2014 12:39:00 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 01 Dec 2014 03:38:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,493,1413270000"; d="scan'208";a="640642870" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 01 Dec 2014 03:38:57 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id sB1BctsH012904; Mon, 1 Dec 2014 11:38:56 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id sB1BctFG029229; Mon, 1 Dec 2014 11:38:55 GMT Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id sB1BctcW029224; Mon, 1 Dec 2014 11:38:55 GMT From: Bruce Richardson To: dev@dpdk.org Date: Mon, 1 Dec 2014 11:38:54 +0000 Message-Id: <1417433935-29181-2-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1417433935-29181-1-git-send-email-bruce.richardson@intel.com> References: <1417433935-29181-1-git-send-email-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH 1/2] testpmd: fix out-of-range compiler error 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: Mon, 01 Dec 2014 11:39:02 -0000 The definition value for IPPROTO_DIVERT protocol uses a value which is out of range of the uint8_t type, giving clang compiler errors on FreeBSD. app/test-pmd/icmpecho.c:231:7: fatal error: overflow converting case value to switch condition type (258 to 2) [-Wswitch] case IPPROTO_DIVERT: /**< divert pseudo-protocol */ This is fixed by having the code to return the protocol name use the uint16_t type for the protocol value input. Signed-off-by: Bruce Richardson --- app/test-pmd/icmpecho.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c index c25a54b..08ea01d 100644 --- a/app/test-pmd/icmpecho.c +++ b/app/test-pmd/icmpecho.c @@ -88,7 +88,7 @@ arp_op_name(uint16_t arp_op) } static const char * -ip_proto_name(uint8_t ip_proto) +ip_proto_name(uint16_t ip_proto) { static const char * ip_proto_names[] = { "IP6HOPOPTS", /**< IP6 hop-by-hop options */ -- 2.1.0