Skip to content

Commit

Permalink
Bug 970271: Fix GCC warnings about comparison of signed and unsigned …
Browse files Browse the repository at this point in the history
…values, r=rjesup
  • Loading branch information
tdz committed Feb 27, 2014
1 parent 2650d61 commit 8d60b47
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion netwerk/protocol/rtsp/controller/RtspControllerChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ RtspControllerChild::RecvOnConnected(
AddMetaData(meta.forget());

// Notify the listener when meta data of tracks are available.
if ((index + 1) == mTotalTracks) {
if ((static_cast<uint32_t>(index) + 1) == mTotalTracks) {
// The controller provide |GetTrackMetaData| method for his client.
if (mListener) {
mListener->OnConnected(index, nullptr);
Expand Down
4 changes: 2 additions & 2 deletions netwerk/protocol/rtsp/controller/RtspControllerParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ PRLogModuleInfo* gRtspLog;
#define LOG(args) PR_LOG(gRtspLog, PR_LOG_DEBUG, args)

#define SEND_DISCONNECT_IF_ERROR(rv) \
if (NS_FAILED(rv) && mIPCOpen && mTotalTracks > 0) { \
for (int i = 0; i < mTotalTracks; i++) { \
if (NS_FAILED(rv) && mIPCOpen && mTotalTracks > 0ul) { \
for (uint32_t i = 0; i < mTotalTracks; i++) { \
SendOnDisconnected(i, rv); \
} \
}
Expand Down
6 changes: 3 additions & 3 deletions netwerk/srtp/src/crypto/cipher/cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
test_case->ciphertext_length_octets));

/* compare the resulting ciphertext with that in the test case */
if (len != test_case->ciphertext_length_octets)
if (len != (unsigned int)test_case->ciphertext_length_octets)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < test_case->ciphertext_length_octets; i++)
Expand Down Expand Up @@ -222,7 +222,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
test_case->plaintext_length_octets));

/* compare the resulting plaintext with that in the test case */
if (len != test_case->plaintext_length_octets)
if (len != (unsigned int)test_case->plaintext_length_octets)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < test_case->plaintext_length_octets; i++)
Expand Down Expand Up @@ -344,7 +344,7 @@ cipher_type_test(const cipher_type_t *ct, const cipher_test_case_t *test_data) {
octet_string_hex_string(buffer, length));

/* compare the resulting plaintext with the original one */
if (length != plaintext_len)
if (length != (unsigned)plaintext_len)
return err_status_algo_fail;
status = err_status_ok;
for (i=0; i < plaintext_len; i++)
Expand Down
2 changes: 1 addition & 1 deletion netwerk/srtp/src/crypto/kernel/err.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void
err_report(int priority, char *format, ...) {
va_list args;

if (priority <= err_level) {
if ((err_reporting_level_t)priority <= err_level) {

va_start(args, format);
if (err_file != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion netwerk/srtp/src/crypto/replay/rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ rdb_add_index(rdb_t *rdb, uint32_t p_index) {
/* here we *assume* that p_index > rdb->window_start */

delta = (p_index - rdb->window_start);
if (delta < rdb_bits_in_bitmask) {
if (delta < (int)rdb_bits_in_bitmask) {

/* if the p_index is within the window, set the appropriate bit */
v128_set_bit(&rdb->bitmask, delta);
Expand Down

0 comments on commit 8d60b47

Please sign in to comment.