aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/unit_tls.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-24 19:38:02 -0500
committerJack Lloyd <[email protected]>2017-01-24 19:38:02 -0500
commit53d69ce19b02051cbf732af00ab98bcf384561cd (patch)
tree9257233777f7ab0eb2f1f2411bd363700ad30429 /src/tests/unit_tls.cpp
parentb49eaee216142ad6eab5ad437aea44b7897baf84 (diff)
Fix various SunCC and Solaris warnings and build problems.
Based on build output sent by @noloader. If RLIMIT_MEMLOCK is not defined, assume regular user is not able to call mlock. This probably also affected Clang/GCC on Solaris. Work around resolution issue in SIMD_4x32 where it finds ambiguity between arg taking uint32_t and __m128i. This is probably some artifact of how SunCC represents vector types, and seems highly bogus in general but is easy to work around here. Change constructor taking a single value to instead be `SIMD_4x32::splat` function. The SIMD class is internal, so no API implications. Fix various warnings about lambda functions that were missing return types and which were not a single return statement. AIUI C++11 doesn't guarantee that lambda return type will be deduced in that situation, though in practice every compiler including SunCC seems to handle it. Disable AVX2 usage, since SunCC's intrinsics seem to be broken - its _mm_loadu_si256 takes non-const pointer. Rename a few variables in the tests to avoid shadowed var warnings.
Diffstat (limited to 'src/tests/unit_tls.cpp')
-rw-r--r--src/tests/unit_tls.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp
index 35effc5a2..b910e3e0b 100644
--- a/src/tests/unit_tls.cpp
+++ b/src/tests/unit_tls.cpp
@@ -248,7 +248,7 @@ Test::Result test_tls_handshake(Botan::TLS::Protocol_Version offer_version,
return false;
};
- auto next_protocol_chooser = [&](std::vector<std::string> protos) {
+ auto next_protocol_chooser = [&](std::vector<std::string> protos) -> std::string {
if(r <= 2)
{
result.test_eq("protocol count", protos.size(), 2);
@@ -559,7 +559,7 @@ Test::Result test_dtls_handshake(Botan::TLS::Protocol_Version offer_version,
return true;
};
- auto next_protocol_chooser = [&](std::vector<std::string> protos) {
+ auto next_protocol_chooser = [&](std::vector<std::string> protos) -> std::string {
if(r <= 2)
{
result.test_eq("protocol count", protos.size(), 2);