From 4b295f1f32e3ce3461a13c166dc3cf08242da7d0 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 4 Dec 2018 22:12:07 -0500 Subject: [PATCH] Use const_cast instead of reinterpret_cast --- misc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc.h b/misc.h index 29b07209..14b0dd19 100644 --- a/misc.h +++ b/misc.h @@ -1294,7 +1294,7 @@ template<> inline void SecureWipeBuffer(word64 *buf, size_t n) # ifdef __GNUC__ asm volatile("rep stosq" : "+c"(n), "+D"(p) : "a"(0) : "memory"); # else - __stosq(reinterpret_cast(reinterpret_cast(p)), 0, n); + __stosq(const_cast(p), 0, n); # endif #else SecureWipeBuffer(reinterpret_cast(buf), 2*n);