Closed
Bug 915344
Opened 11 years ago
Closed 11 years ago
mediaconduit_unittests.cpp:280:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Categories
(Core :: WebRTC, defect)
Core
WebRTC
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.84 KB,
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
Build warning:
{
media/webrtc/signaling/test/mediaconduit_unittests.cpp:280:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}
...for this line:
> 280 MOZ_ASSERT(SAMPLES <= PLAYOUT_SAMPLE_LENGTH);
http://mxr.mozilla.org/mozilla-central/source/media/webrtc/signaling/test/mediaconduit_unittests.cpp?rev=4fdd3cddee3a&mark=280-280#273
...since SAMPLES is an int, whereas PLAYOUT_SAMPLE_LENGTH is an unsigned int.
We can fix this by just changing SAMPLES to be unsigned too; it's set as (PLAYOUT_SAMPLE_FREQUENCY * 10), where PLAYOUT_SAMPLE_FREQUENCY is unsigned, and we only compare it to a signed integer in one spot. (That one spot is a comparison tonumSamplesReadFromInput, which can be made unsigned as well, since it starts at 0 and only increases from there.) So, there's no reason for SAMPLES to be signed.
Patch coming up to make both numSamplesReadFromInput and SAMPLES unsigned.
Assignee | ||
Comment 1•11 years ago
|
||
Updated•11 years ago
|
Attachment #803234 -
Flags: review?(rjesup) → review+
Assignee | ||
Comment 2•11 years ago
|
||
Flags: in-testsuite-
Comment 3•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•