Use const_cast instead of reinterpret_cast
parent
7832ae3733
commit
4b295f1f32
2
misc.h
2
misc.h
|
|
@ -1294,7 +1294,7 @@ template<> inline void SecureWipeBuffer(word64 *buf, size_t n)
|
||||||
# ifdef __GNUC__
|
# ifdef __GNUC__
|
||||||
asm volatile("rep stosq" : "+c"(n), "+D"(p) : "a"(0) : "memory");
|
asm volatile("rep stosq" : "+c"(n), "+D"(p) : "a"(0) : "memory");
|
||||||
# else
|
# else
|
||||||
__stosq(reinterpret_cast<word64 *>(reinterpret_cast<size_t>(p)), 0, n);
|
__stosq(const_cast<word64 *>(p), 0, n);
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
SecureWipeBuffer(reinterpret_cast<word32 *>(buf), 2*n);
|
SecureWipeBuffer(reinterpret_cast<word32 *>(buf), 2*n);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue