Closed Bug 1257408 Opened 8 years ago Closed 8 years ago

C4312 warnings in js/src/jit/Registers.h js/src/jit/shared/Assembler-shared.h and js/src/gdb/tests/test-Interpreter.cpp

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: gps, Assigned: jandem)

References

Details

Attachments

(1 file)

The following C4312 warnings are being unhidden in bug 1124033. When building with warnings as errors with VS2015u1 in automation, these fail the build.

js/src/jit/Registers.h(150): warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to 'js::jit::Registers::RegisterContent *' of greater size
js/src/jit/Registers.h(152): warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to 'js::jit::FloatRegisters::RegisterContent *' of greater size
js/src/jit/shared/Assembler-shared.h(549): warning C4312: 'type cast': conversion from 'unsigned int' to 'uint8_t *' of greater size
js/src/gdb/tests/test-Interpreter.cpp(81): warning C4312: 'type cast': conversion from 'unsigned int' to 'js::jit::BaselineFrame *' of greater size
js/src/gdb/tests/test-Interpreter.cpp(84): warning C4312: 'type cast': conversion from 'unsigned int' to 'js::jit::RematerializedFrame *' of greater size
Flags: needinfo?(jdemooij)
gps, are these the *only* C4312 warnings in js/src/? Are there other js/src/ warnings?

Asking because these particular warnings are trivial to fix (I've a patch), but if there are more we should consider suppressing them.
Flags: needinfo?(gps)
Yes, this is the full list of C4312 warnings in js/src.
Flags: needinfo?(gps)
Attached patch PatchSplinter Review
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(jdemooij)
Attachment #8731757 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8731757 [details] [diff] [review]
Patch

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

::: js/src/jit/shared/Assembler-shared.h
@@ +545,5 @@
>      CodeLocationJump() {
>          raw_ = nullptr;
>          setUninitialized();
>  #ifdef JS_SMALL_BRANCH
> +        jumpTableEntry_ = (uint8_t*)uintptr_t(0xdeadab1e);

nit: Add an extra space before uintptr_t.
Attachment #8731757 - Flags: review?(nicolas.b.pierron) → review+
https://hg.mozilla.org/mozilla-central/rev/d1fca8995788
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Blocks: 1259304
You need to log in before you can comment on or make changes to this bug.