Lots of trivial tweaks to minimize compiler warnings, especially on 64-bit platform: Added missing type casts, changed types, added missing NULL checks.

This commit is contained in:
Peter Olsson
2014-01-22 22:28:53 +01:00
parent 643c88f49b
commit 084e245085
57 changed files with 226 additions and 216 deletions

View File

@@ -230,7 +230,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
}
if (!bug->record_frame_size) {
switch_size_t frame_size;
uint32_t frame_size;
switch_codec_implementation_t read_impl = { 0 };
//switch_codec_implementation_t other_read_impl = { 0 };
//switch_core_session_t *other_session;
@@ -301,7 +301,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
}
switch_mutex_unlock(bug->read_mutex);
} else if (fill_read) {
frame->datalen = bytes;
frame->datalen = (uint32_t)bytes;
memset(frame->data, 255, frame->datalen);
}
@@ -326,7 +326,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
fp = (int16_t *) frame->data;
rlen = frame->datalen / 2;
wlen = datalen / 2;
blen = bytes / 2;
blen = (uint32_t)(bytes / 2);
if (switch_test_flag(bug, SMBF_STEREO)) {
int16_t *left, *right;
@@ -380,8 +380,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
}
}
frame->datalen = bytes;
frame->samples = bytes / sizeof(int16_t);
frame->datalen = (uint32_t)bytes;
frame->samples = (uint32_t)(bytes / sizeof(int16_t));
frame->rate = read_impl.actual_samples_per_second;
frame->codec = NULL;