From: Nikos Mavrogiannopoulos Date: Mon, 29 Feb 2016 12:23:25 +0000 (+0100) Subject: tests: always used the slow (portable) version of get16bits X-Git-Tag: gnutls_3_5_0~284 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b351bbf123586e0c115c201c0fc5aa9967d7571c;p=thirdparty%2Fgnutls.git tests: always used the slow (portable) version of get16bits This prevents issues with misaligned addresses and undefined sanitizer. --- diff --git a/tests/suite/ecore/src/lib/eina_hash.c b/tests/suite/ecore/src/lib/eina_hash.c index 6877b96fdc..5af5ee9a28 100644 --- a/tests/suite/ecore/src/lib/eina_hash.c +++ b/tests/suite/ecore/src/lib/eina_hash.c @@ -131,16 +131,8 @@ struct _Eina_Hash_Each { const void *data; }; -#undef get16bits -#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ - || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) -#define get16bits(d) (*((const uint16_t *)(d))) -#endif - -#if !defined (get16bits) #define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ + (uint32_t)(((const uint8_t *)(d))[0])) -#endif static inline int _eina_hash_hash_rbtree_cmp_hash(const Eina_Hash_Head * hash_head,