Closed
Bug 1411615
Opened 7 years ago
Closed 7 years ago
-Wclass-memaccess: clearing an object of non-trivial type 'class nsScannerIterator';
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: andi)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
In file included from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/parser/htmlparser/Unified_cpp_parser_htmlparser0.cpp:83:0:
/root/firefox-gcc-last/parser/htmlparser/nsScanner.cpp: In constructor 'nsScanner::nsScanner(const nsAString&)':
/root/firefox-gcc-last/parser/htmlparser/nsScanner.cpp:60:58: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'class nsScannerIterator'; use assignment or value-initialization instead [-Werror=class-memaccess]
memset(&mCurrentPosition, 0, sizeof(mCurrentPosition));
Reporter | ||
Updated•7 years ago
|
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bpostelnicu
Assignee | ||
Comment 1•7 years ago
|
||
I think here it's resonable to not have the default constructor of nsScannerIterator, see [1] https://dxr.mozilla.org/mozilla-central/source/parser/htmlparser/nsScannerString.h#343
And by removing [1] nsScannerIterator becomes a trivial class.
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8922363 [details]
Bug 1411615 - make nsScannerIterator a trivial type in order to use memset.
https://reviewboard.mozilla.org/r/193412/#review198636
Attachment #8922363 -
Flags: review?(hsivonen) → review+
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/046492264917
make nsScannerIterator a trivial type in order to use memset. r=hsivonen
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•