From d902382d8a51759d92d55c6c0175b4499325de86 Mon Sep 17 00:00:00 2001 From: trav90 Date: Wed, 12 Sep 2018 19:09:07 -0500 Subject: Call memset on a void*, not a T*, in js_delete_poison to avoid memset-on-nontrivial warnings with gcc that don't matter for an object whose lifetime is about to end --- js/public/Utility.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/public/Utility.h b/js/public/Utility.h index 68de3004a..99712faa8 100644 --- a/js/public/Utility.h +++ b/js/public/Utility.h @@ -391,7 +391,7 @@ js_delete_poison(const T* p) { if (p) { p->~T(); - memset(const_cast(p), 0x3B, sizeof(T)); + memset(static_cast(const_cast(p)), 0x3B, sizeof(T)); js_free(const_cast(p)); } } -- cgit v1.2.3