Closed
Bug 1377951
Opened 7 years ago
Closed 7 years ago
Unused variable warning-as-error in Mingw in ArrayBufferObject.cpp
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: tjr, Assigned: tjr)
References
Details
(Whiteboard: [tor])
Attachments
(1 file)
In js/src/vm/ArrayBufferObject.cpp, mappedSizeWithHeader is not used unless we are on non-Windows or are using Valgrind. (I don't believe we are ever using valgrind on Windows.)
This causes a warning-as-error:
> /home/worker/workspace/build/src/js/src/vm/ArrayBufferObject.cpp:685:12: error: unused variable 'mappedSizeWithHeader' [-Werror=unused-variable]
> size_t mappedSizeWithHeader = header->mappedSize() + gc::SystemPageSize();
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8883085 [details] Bug 1377951 Move a variable so it does not generate unused variable warnings (as errors) in MinGW https://reviewboard.mozilla.org/r/154046/#review159182 ::: js/src/vm/ArrayBufferObject.cpp:690 (Diff revision 1) > > MemProfiler::RemoveNative(base); > # ifdef XP_WIN > VirtualFree(base, 0, MEM_RELEASE); > # else // XP_WIN > + size_t mappedSizeWithHeader = header->mappedSize() + gc::SystemPageSize(); mappedSizeWithHeader is used also in VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, so moving the definition here is not correct.
Attachment #8883085 -
Flags: review-
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8883085 [details] Bug 1377951 Move a variable so it does not generate unused variable warnings (as errors) in MinGW https://reviewboard.mozilla.org/r/154046/#review159186 sorry, I overlooked the reasoning in comment #0. clearing r- for now
Attachment #8883085 -
Flags: review-
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
Rebased patch, try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1b076ab1f7cc18856ea52237c5f975ed1b56ffd9
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8883085 [details] Bug 1377951 Move a variable so it does not generate unused variable warnings (as errors) in MinGW https://reviewboard.mozilla.org/r/154046/#review176272 we could re-think about the conditions once someone hit the issue on windows with configuration that valgrind is enabled (I cannot think of the case tho, there might be some use case).
Attachment #8883085 -
Flags: review?(arai.unmht) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by philringnalda@gmail.com: https://hg.mozilla.org/integration/autoland/rev/66d6a3d2b97f Move a variable so it does not generate unused variable warnings (as errors) in MinGW r=arai
Keywords: checkin-needed
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/66d6a3d2b97f
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•