diff options
author | Jack Lloyd <[email protected]> | 2017-03-22 14:03:33 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-03-22 14:03:33 -0400 |
commit | 9474d89970157f7a6c6bdc5044025170a90f27b2 (patch) | |
tree | 4cb26010af18abb7e485f9585c5572281d3c4971 | |
parent | cf02ab0b5f60296e44d5e957278b27a7333fae23 (diff) |
Fix some compiler warnings.
-rw-r--r-- | src/lib/asn1/ber_dec.h | 2 | ||||
-rw-r--r-- | src/lib/utils/os_utils.cpp | 2 | ||||
-rw-r--r-- | src/tests/test_utils.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/asn1/ber_dec.h b/src/lib/asn1/ber_dec.h index 4a5aa88fc..6320ab9fc 100644 --- a/src/lib/asn1/ber_dec.h +++ b/src/lib/asn1/ber_dec.h @@ -61,7 +61,7 @@ class BOTAN_DLL BER_Decoder "; Output type size is " + std::to_string(sizeof(T))); - copy_mem((uint8_t *)&out, obj.value.data(), obj.value.size()); + copy_mem(reinterpret_cast<uint8_t*>(&out), obj.value.data(), obj.value.size()); return (*this); } diff --git a/src/lib/utils/os_utils.cpp b/src/lib/utils/os_utils.cpp index fe45ad82f..7bd9b842d 100644 --- a/src/lib/utils/os_utils.cpp +++ b/src/lib/utils/os_utils.cpp @@ -345,7 +345,7 @@ void botan_sigill_handler(int) int OS::run_cpu_instruction_probe(std::function<int ()> probe_fn) { - int probe_result = -3; + volatile int probe_result = -3; #if defined(BOTAN_TARGET_OS_TYPE_IS_UNIX) struct sigaction old_sigaction; diff --git a/src/tests/test_utils.cpp b/src/tests/test_utils.cpp index ce301918d..a2601722d 100644 --- a/src/tests/test_utils.cpp +++ b/src/tests/test_utils.cpp @@ -212,7 +212,7 @@ class Date_Format_Tests : public Text_Based_Test result.test_is_eq("minute", c.minutes, d[4]); result.test_is_eq("second", c.seconds, d[5]); - if(type == "valid.not_std" || type == "valid.64_bit_time_t" && c.year > 2037 && sizeof(std::time_t) == 4) + if(type == "valid.not_std" || (type == "valid.64_bit_time_t" && c.year > 2037 && sizeof(std::time_t) == 4)) { result.test_throws("valid but out of std::timepoint range", [c]() { c.to_std_timepoint(); }); } |