[dpdk-dev,1/2] examples/l2fwd-crypto: fix for icc

Message ID 1459759611-13788-2-git-send-email-danielx.t.mrzyglod@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Daniel Mrzyglod April 4, 2016, 8:46 a.m. UTC
  Fix for compilation errors for icc:
error #188: enumerated type mixed with another type

Fixes: 00c58901f1b3 ("examples/l2fwd-crypto: use key-value list of supported algorithms")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
 examples/l2fwd-crypto/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

De Lara Guarch, Pablo April 4, 2016, 9:34 a.m. UTC | #1
> -----Original Message-----
> From: Mrzyglod, DanielX T
> Sent: Monday, April 04, 2016 9:47 AM
> To: dev@dpdk.org
> Cc: Wu, Jingjing; De Lara Guarch, Pablo
> Subject: [PATCH 1/2] examples/l2fwd-crypto: fix for icc
> 
> Fix for compilation errors for icc:
> error #188: enumerated type mixed with another type
> 
> Fixes: 00c58901f1b3 ("examples/l2fwd-crypto: use key-value list of
> supported algorithms")
> 
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  

Patch

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 35171d1..182dc56 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -902,7 +902,7 @@  parse_cipher_algo(enum rte_crypto_cipher_algorithm *algo, char *optarg)
 
 	for (i = 0; i < RTE_CRYPTO_CIPHER_LIST_END; i++) {
 		if (!strcmp(supported_cipher_algo[i], optarg)) {
-			*algo = i;
+			*algo = (enum rte_crypto_cipher_algorithm)i;
 			return 0;
 		}
 	}
@@ -978,7 +978,7 @@  parse_auth_algo(enum rte_crypto_auth_algorithm *algo, char *optarg)
 
 	for (i = 0; i < RTE_CRYPTO_AUTH_LIST_END; i++) {
 		if (!strcmp(supported_auth_algo[i], optarg)) {
-			*algo = i;
+			*algo = (enum rte_crypto_auth_algorithm)i;
 			return 0;
 		}
 	}