From ff8442588504ba5c54ed258a237c6527719f0120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Sj=C3=B6holm?= Date: Tue, 3 Feb 2015 08:56:48 +0200 Subject: [PATCH] ocb: fix gcc4.8 compiling problem with __ARM_NEON__ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes following problem when compiling mosh with gcc4.8 and __ARM_NEON__ defined by using -121 instead of 135. ocb.cc: In function 'block double_block(block)': ocb.cc:263:56: error: narrowing conversion of '135' from 'int' to '__builtin_neon_qi' inside { } is ill-formed in C++11 [-Werror=narrowing] Signed-off-by: Pasi Sjöholm --- src/crypto/ocb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/ocb.cc b/src/crypto/ocb.cc index 8cab32e..5b179e5 100644 --- a/src/crypto/ocb.cc +++ b/src/crypto/ocb.cc @@ -260,7 +260,7 @@ } static inline block double_block(block b) { - const block mask = {135,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; + const block mask = {-121,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; block tmp = vshrq_n_s8(b,7); tmp = vandq_s8(tmp, mask); tmp = vextq_s8(tmp, tmp, 1); /* Rotate high byte to end */