summaryrefslogtreecommitdiff
path: root/js
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
commitebe69fc9636e0ec5746b7a908db006d317806e5d (patch)
treed353ea91ced44a67c95788b577a331c16bf3049c /js
parent194f887a4557c0ee2a70fbbaada52fd8390f5fe1 (diff)
downloaduxp-ebe69fc9636e0ec5746b7a908db006d317806e5d.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')
-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));
}
}