diff options
Diffstat (limited to 'src')
-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(); }); } |