From f2b4a466779f5481c79d711ee2601d60ce41a6ad Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 10 Sep 2010 08:53:50 -0400 Subject: KWSys: Suppress -Wcast-align warning in MD5.c The code does contain a cast that increases alignment but only in a conditional that verifies the input is sufficiently aligned. --- Source/kwsys/MD5.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/kwsys/MD5.c b/Source/kwsys/MD5.c index 1ea0a66..56776a3 100644 --- a/Source/kwsys/MD5.c +++ b/Source/kwsys/MD5.c @@ -29,6 +29,11 @@ it in a single source file instead of a separate header and implementation file. */ +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wcast-align" +#endif + /* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. @@ -428,6 +433,10 @@ static void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } +#if defined(__clang__) +# pragma clang diagnostic pop +#endif + /*--------------------------------------------------------------------------*/ /* Wrap up the MD5 state in our opaque structure. */ struct kwsysMD5_s -- cgit v0.12