Closed
Bug 1411584
Opened 7 years ago
Closed 7 years ago
-Wclass-memaccess: clearing an object of non-trivial type 'struct mozilla::dom::GamepadPoseState';
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: andi)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/GamepadPoseState.h: In member function 'void mozilla::dom::GamepadPoseState::Clear()': /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/GamepadPoseState.h:85:45: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct mozilla::dom::GamepadPoseState'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(this, 0, sizeof(GamepadPoseState));
Assignee | ||
Comment 1•7 years ago
|
||
This is a good catch, since we need to have this landed: 525063
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bpostelnicu
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8922232 [details] Bug 1411584 - avoid using memset on a non-trivial type object. https://reviewboard.mozilla.org/r/193260/#review198750 I believe the intention here was for this to be a POD type, but perhaps it is being promoted to non-trivial due to the constructor. Perhaps we could do some static asserts in the future where we depend on something being a POD to catch these.
Attachment #8922232 -
Flags: review?(kgilbert) → review+
Pushed by bpostelnicu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/907068074409 avoid using memset on a non-trivial type object. r=kip
Comment 5•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/907068074409
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•