diff options
author | Jack Lloyd <[email protected]> | 2017-01-24 19:38:02 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-01-24 19:38:02 -0500 |
commit | 53d69ce19b02051cbf732af00ab98bcf384561cd (patch) | |
tree | 9257233777f7ab0eb2f1f2411bd363700ad30429 /src/lib/x509/x509path.cpp | |
parent | b49eaee216142ad6eab5ad437aea44b7897baf84 (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/lib/x509/x509path.cpp')
-rw-r--r-- | src/lib/x509/x509path.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/x509/x509path.cpp b/src/lib/x509/x509path.cpp index 2fa1adbd6..c70ecae7a 100644 --- a/src/lib/x509/x509path.cpp +++ b/src/lib/x509/x509path.cpp @@ -267,14 +267,14 @@ PKIX::check_ocsp_online(const std::vector<std::shared_ptr<const X509_Certificate if(subject->ocsp_responder() == "") { - ocsp_response_futures.emplace_back(std::async(std::launch::deferred, [&]{ + ocsp_response_futures.emplace_back(std::async(std::launch::deferred, [&]() -> std::shared_ptr<const OCSP::Response> { throw Exception("No OCSP responder URL set for this certificate"); return std::shared_ptr<const OCSP::Response>(); })); } else { - ocsp_response_futures.emplace_back(std::async(std::launch::async, [&]{ + ocsp_response_futures.emplace_back(std::async(std::launch::async, [&]() -> std::shared_ptr<const OCSP::Response> { OCSP::Request req(*issuer, *subject); auto http = HTTP::POST_sync(subject->ocsp_responder(), @@ -356,14 +356,14 @@ PKIX::check_crl_online(const std::vector<std::shared_ptr<const X509_Certificate> else if(cert_path[i]->crl_distribution_point() == "") { // Avoid creating a thread for this case - future_crls.emplace_back(std::async(std::launch::deferred, [&]{ + future_crls.emplace_back(std::async(std::launch::deferred, [&]() -> std::shared_ptr<const X509_CRL> { throw Exception("No CRL distribution point for this certificate"); return std::shared_ptr<const X509_CRL>(); })); } else { - future_crls.emplace_back(std::async(std::launch::async, [&]() { + future_crls.emplace_back(std::async(std::launch::async, [&]() -> std::shared_ptr<const X509_CRL> { auto http = HTTP::GET_sync(cert_path[i]->crl_distribution_point()); http.throw_unless_ok(); // check the mime type? |