Author: cazfi Date: Sat Jun 7 23:09:59 2014 New Revision: 25082 URL: http://svn.gna.org/viewcvs/freeciv?rev=25082&view=rev Log: Dropped the special optimized version of md5 code for some platforms where alignment would cause no problems. This fixes clang warning about how that optimized version would be unportable to other platforms.
Reported by David Lowe <doctorjlowe> See bug #18872 Modified: trunk/utility/md5.c Modified: trunk/utility/md5.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/md5.c?rev=25082&r1=25081&r2=25082&view=diff ============================================================================== --- trunk/utility/md5.c (original) +++ trunk/utility/md5.c Sat Jun 7 23:09:59 2014 @@ -103,17 +103,7 @@ /* * SET reads 4 input bytes in little-endian byte order and stores them * in a properly aligned word in host byte order. - * - * The check for little-endian architectures that tolerate unaligned - * memory accesses is just an optimization. Nothing will break if it - * doesn't work. - */ -#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) -#define SET(n) \ - (*(MD5_u32plus *)&ptr[(n) * 4]) -#define GET(n) \ - SET(n) -#else + */ #define SET(n) \ (ctx->block[(n)] = \ (MD5_u32plus)ptr[(n) * 4] | \ @@ -122,7 +112,6 @@ ((MD5_u32plus)ptr[(n) * 4 + 3] << 24)) #define GET(n) \ (ctx->block[(n)]) -#endif /* * This processes one or more 64-byte data blocks, but does NOT update _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits