[botan-devel] Compiler warning going to Android NDK v10 from v9

William K. Foster wkf at alum.mit.edu
Tue Jan 13 16:12:15 EST 2015


Hello,

I've been building Botan v1.10.9 successfully for Android using the Native
Development Kit v9, however, when I try to go to v10 of the NDK, I get the
following warning:

[armeabi] Compile++ thumb: botan <= botan_all.cpp
/Users/wkf/sds/flume/android/workspace/jni/botan/botan_all.cpp: In function
'void Botan::{anonymous}::BMW_512_compress(Botan::u64bit*, const u64bit*,
Botan::u64bit*)':
/Users/wkf/sds/flume/android/workspace/jni/botan/botan_all.cpp:25863:36:
warning: iteration 7u invokes undefined behavior
[-Waggressive-loop-optimizations]
                (0x0555555555555555 * i)) ^ H[(i-16+7)%16]);
                                    ^
/Users/wkf/sds/flume/android/workspace/jni/botan/botan_all.cpp:25850:4:
note: containing loop
    for(size_t i = 16 + EXPAND_1_ROUNDS; i != 32; ++i)
    ^


I think this is a legitimate warning and perhaps was an existing issue but
not uncovered in v9.  Please suggest how the code might be changed to avoid
the possible overflow condition and avoid the compiler warning.

Thanks.

-William
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20150113/8ea9b78f/attachment.html>


More information about the botan-devel mailing list