Closed
Bug 1030605
Opened 10 years ago
Closed 10 years ago
LinearScan.cpp:996:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: dholbert, Assigned: bbouvier)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
9.01 KB,
patch
|
mjrosenb
:
review+
|
Details | Diff | Splinter Review |
New group of build warnings in mozilla-central:
{
2:20.67 $SRCDIRjs/src/jit/LinearScan.cpp: In member function 'js::jit::AnyRegister::Code js::jit::LinearScanAllocator::findBestFreeRegister(js::jit::CodePosition*)':
2:20.67 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.67 $SRCDIRjs/src/jit/LinearScan.cpp:996:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.67 for (int a = 0; a < reg.numAliased(); a++) {
2:20.67 ^
2:20.67 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.67 $SRCDIRjs/src/jit/LinearScan.cpp:1007:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.67 for (int a = 0; a < reg.numAliased(); a++) {
2:20.67 ^
2:20.67 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.67 $SRCDIRjs/src/jit/LinearScan.cpp:1020:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.67 for (int a = 0; a < reg.numAliased(); a++) {
2:20.67 ^
2:20.68 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.68 $SRCDIRjs/src/jit/LinearScan.cpp:1042:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.68 for (int a = 0; a < prevReg.numAliased(); a++) {
2:20.68 ^
2:20.68 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.68 $SRCDIRjs/src/jit/LinearScan.cpp:1059:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.68 for (int a = 0; a < hintReg.numAliased(); a++) {
2:20.68 ^
2:20.68 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.68 $SRCDIRjs/src/jit/LinearScan.cpp:1073:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.68 for (int a = 0; a < hintReg.numAliased(); a++) {
2:20.68 ^
2:20.68 $SRCDIRjs/src/jit/LinearScan.cpp: In member function 'js::jit::AnyRegister::Code js::jit::LinearScanAllocator::findBestBlockedRegister(js::jit::CodePosition*)':
2:20.69 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.69 $SRCDIRjs/src/jit/LinearScan.cpp:1124:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.69 for (int a = 0; a < fullreg.numAliased(); a++) {
2:20.69 ^
2:20.69 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.69 $SRCDIRjs/src/jit/LinearScan.cpp:1142:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.69 for (int a = 0; a < reg.numAliased(); a++) {
2:20.69 ^
2:20.69 Warning: -Wsign-compare in $SRCDIRjs/src/jit/LinearScan.cpp: comparison between signed and unsigned integer expressions
2:20.69 $SRCDIRjs/src/jit/LinearScan.cpp:1155:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2:20.69 for (int a = 0; a < fullreg.numAliased(); a++) {
2:20.69 ^
}
(I'm using GCC 4.9, but I'm pretty sure all gcc & clang versions will warn about this.)
This all seems to be code added today in bug 991153.
Marty, mind fixing? (numAliased seems to be uint32_t, so presumably that's the type we should be using for our loop counters)
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(mrosenberg)
Assignee | ||
Comment 1•10 years ago
|
||
Pretty sure I made a remark in the review re: using int32_t or size_t in this case rather than plain int. Whatever, let's make the compiler shut up :)
Assignee: nobody → benj
Status: NEW → ASSIGNED
Attachment #8446410 -
Flags: review?(mrosenberg)
Flags: needinfo?(mrosenberg)
Updated•10 years ago
|
Attachment #8446410 -
Flags: review?(mrosenberg) → review+
Comment 2•10 years ago
|
||
(In reply to Benjamin Bouvier [:bbouvier] from comment #1)
> Created attachment 8446410 [details] [diff] [review]
> bug1030605.patch
>
> Pretty sure I made a remark in the review re: using int32_t or size_t in
> this case rather than plain int. Whatever, let's make the compiler shut up :)
Ahh, I did not realize that you meant *everywhere*. I also suspect most of these were from patches that you didn't review.
Assignee | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•