Last Comment Bug 723809 - TestTArray.cpp:886:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
: TestTArray.cpp:886:28: warning: comparison between signed and unsigned intege...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla13
Assigned To: Daniel Holbert [:dholbert]
:
:
Mentors:
Depends on:
Blocks: buildwarning 719531
  Show dependency treegraph
 
Reported: 2012-02-02 19:29 PST by Daniel Holbert [:dholbert]
Modified: 2012-02-03 10:54 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (1.06 KB, patch)
2012-02-02 19:32 PST, Daniel Holbert [:dholbert]
justin.lebar+bug: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2012-02-02 19:29:34 PST
Build warning:
{
TestTArray.cpp: In function ‘bool TestTArray::test_fallible()’:
TestTArray.cpp:886:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}
Comment 1 Daniel Holbert [:dholbert] 2012-02-02 19:32:41 PST
Created attachment 594060 [details] [diff] [review]
fix

The warning is because "numArrays" is currently a signed int, and we compare it to the unsigned value 'i' here:
>   for (PRUint32 i = 0; i < numArrays; i++) {

This patch makes numArrays unsigned & fixes the warning.
Comment 2 Justin Lebar (not reading bugmail) 2012-02-02 22:46:18 PST
Comment on attachment 594060 [details] [diff] [review]
fix

When I saw that there was a blocker on the TArray changes, I was really nervous!  Phew.  :)
Comment 3 Daniel Holbert [:dholbert] 2012-02-03 01:21:55 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/74cb806f25c2
Comment 4 Ed Morley [:emorley] 2012-02-03 10:54:17 PST
https://hg.mozilla.org/mozilla-central/rev/74cb806f25c2

Note You need to log in before you can comment on or make changes to this bug.