Closed Bug 1458236 Opened 2 years ago Closed 2 years ago

Unused variable in Simulator-arm.cpp when doing a no-debug build

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

Details

Attachments

(1 file)

In SimulatorProcess:checkICacheLocked cmpret is asserted to be zero [1], but if the assert is compiled away by doing a no-debug build, there's a compile error due to unused variables.

In file included from /Users/mgaudet/mozilla-unified/js/src/build_arm_OPT.OBJ/js/src/Unified_cpp_js_src23.cpp:47:
/Users/mgaudet/mozilla-unified/js/src/jit/arm/Simulator-arm.cpp:1096:13: error: unused variable 'cmpret' [-Werror,-Wunused-variable]
        int cmpret = memcmp(reinterpret_cast<void*>(instr),
            ^
1 error generated.
make[3]: *** [Unified_cpp_js_src23.o] Error 1

One possible fix here is mozilla::Unused

[1]: https://searchfox.org/mozilla-central/source/js/src/jit/arm/Simulator-arm.cpp#1096,1099
Priority: -- → P3
Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
Comment on attachment 8972330 [details] [diff] [review]
Correct unused variable in Simulator-arm.cpp

Review of attachment 8972330 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8972330 - Flags: review?(jdemooij) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/edef0c031724
Correct unused variable in Simulator-arm.cpp. r=jandem
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/edef0c031724
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.