Update of bug #18872 (project freeciv):

                 Summary: Freeciv does not compile with clang => Freeciv
gives warnings with clang toolchain


Follow-up Comment #5:

Re the md5.c warning: I suspect it's running into this bit of code (which is
from Solar Designer's original):

 * 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])
/* ... */
/* ...do it properly... */

Presumably one of those symbols is defined on doctorjlowe's setup. Does the
warning go away if you change this to "#if 0"?

If so, we could avoid the warning by adding some sort of clang detection in
that #if. (Alternatively, by turning off -Wcast-align for clang, but that's
likely to be fiddlier and may hide issues we're interested in.)


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to