Fix MSVC warnings about value truncations, webrtc/common_audio/ edition.

This changes some method signatures to better reflect how callers are actually
using them.  This also has the tendency to make signatures more consistent about
e.g. using int (instead of int16_t) for lengths of things like vectors, and
using int16_t (instead of int) for e.g. counts of bits in a value.

This also removes a couple of functions that were only called in unittests.

BUG=3353,chromium:81439
TEST=none
R=andrew@webrtc.org, bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/23389004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7060 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org
2014-09-04 13:21:44 +00:00
parent f6ab6f86e7
commit 3cbd6c26c8
15 changed files with 82 additions and 140 deletions

View File

@ -84,7 +84,7 @@ static __inline int16_t WebRtcSpl_SubSatW16(int16_t var1, int16_t var2) {
#if !defined(MIPS32_LE)
static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {
int bits;
int16_t bits;
if (0xFFFF0000 & n) {
bits = 16;
@ -100,8 +100,8 @@ static __inline int16_t WebRtcSpl_GetSizeInBits(uint32_t n) {
return bits;
}
static __inline int WebRtcSpl_NormW32(int32_t a) {
int zeros;
static __inline int16_t WebRtcSpl_NormW32(int32_t a) {
int16_t zeros;
if (a == 0) {
return 0;
@ -123,8 +123,8 @@ static __inline int WebRtcSpl_NormW32(int32_t a) {
return zeros;
}
static __inline int WebRtcSpl_NormU32(uint32_t a) {
int zeros;
static __inline int16_t WebRtcSpl_NormU32(uint32_t a) {
int16_t zeros;
if (a == 0) return 0;
@ -141,8 +141,8 @@ static __inline int WebRtcSpl_NormU32(uint32_t a) {
return zeros;
}
static __inline int WebRtcSpl_NormW16(int16_t a) {
int zeros;
static __inline int16_t WebRtcSpl_NormW16(int16_t a) {
int16_t zeros;
if (a == 0) {
return 0;