summaryrefslogtreecommitdiff
path: root/js/public
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-09-12 19:09:07 -0500
committertrav90 <travawine@palemoon.org>2018-09-12 19:09:07 -0500
commitd902382d8a51759d92d55c6c0175b4499325de86 (patch)
treed353ea91ced44a67c95788b577a331c16bf3049c /js/public
parent8bac8c27fa3455bc0b65c5210bf9cd6bc11a33fc (diff)
downloaduxp-d902382d8a51759d92d55c6c0175b4499325de86.tar.gz
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
Diffstat (limited to 'js/public')
-rw-r--r--js/public/Utility.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/public/Utility.h b/js/public/Utility.h
index 68de3004ab..99712faa8b 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<T*>(p), 0x3B, sizeof(T));
+ memset(static_cast<void*>(const_cast<T*>(p)), 0x3B, sizeof(T));
js_free(const_cast<T*>(p));
}
}