summaryrefslogtreecommitdiffstats
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
parent8bac8c27fa3455bc0b65c5210bf9cd6bc11a33fc (diff)
downloadUXP-d902382d8a51759d92d55c6c0175b4499325de86.tar
UXP-d902382d8a51759d92d55c6c0175b4499325de86.tar.gz
UXP-d902382d8a51759d92d55c6c0175b4499325de86.tar.lz
UXP-d902382d8a51759d92d55c6c0175b4499325de86.tar.xz
UXP-d902382d8a51759d92d55c6c0175b4499325de86.zip
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
-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 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<T*>(p), 0x3B, sizeof(T));
+ memset(static_cast<void*>(const_cast<T*>(p)), 0x3B, sizeof(T));
js_free(const_cast<T*>(p));
}
}