summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurimas Liutikas <aurimas@google.com>2016-02-22 14:36:58 -0800
committerAurimas Liutikas <aurimas@google.com>2016-02-22 14:38:12 -0800
commit14ef3fc99b6b2f62e93bd5bbc9a240cd59201af0 (patch)
tree1bc8737126979df06d52edd45f2407c65744bf7a
parent4877ed122ed52095c86088c1d7122eae1aaab329 (diff)
downloadvoip-14ef3fc99b6b2f62e93bd5bbc9a240cd59201af0.tar.gz
Fix all but one warning in frameworks/opt/net/voip.
Fixes all warnings in frameworks/opt/net/void except for: src/jni/rtp/AudioGroup.cpp:850:45: warning: 'getInput' is deprecated [-Wdeprecated-declarations] record->getInput()); ^ Bug: 27170398 Change-Id: Ic3ab2c4d78bc015d5f5015b32bbad6866a7ba093
-rw-r--r--src/jni/rtp/AmrCodec.cpp4
-rw-r--r--src/jni/rtp/Android.mk4
-rw-r--r--src/jni/rtp/AudioGroup.cpp8
-rw-r--r--src/jni/rtp/G711Codec.cpp4
-rw-r--r--src/jni/rtp/GsmCodec.cpp2
-rw-r--r--src/jni/rtp/rtp_jni.cpp2
6 files changed, 11 insertions, 13 deletions
diff --git a/src/jni/rtp/AmrCodec.cpp b/src/jni/rtp/AmrCodec.cpp
index e2d820e..06914c4 100644
--- a/src/jni/rtp/AmrCodec.cpp
+++ b/src/jni/rtp/AmrCodec.cpp
@@ -128,7 +128,7 @@ int AmrCodec::encode(void *payload, int16_t *samples)
return length;
}
-int AmrCodec::decode(int16_t *samples, int count, void *payload, int length)
+int AmrCodec::decode(int16_t *samples, int /* count */, void *payload, int length)
{
unsigned char *bytes = (unsigned char *)payload;
Frame_Type_3GPP type;
@@ -208,7 +208,7 @@ public:
}
}
- int set(int sampleRate, const char *fmtp) {
+ int set(int sampleRate, const char */* fmtp */) {
return (sampleRate == 8000 && mEncoder && mDecoder) ? 160 : -1;
}
diff --git a/src/jni/rtp/Android.mk b/src/jni/rtp/Android.mk
index 15b8587..7d0898b 100644
--- a/src/jni/rtp/Android.mk
+++ b/src/jni/rtp/Android.mk
@@ -53,8 +53,6 @@ LOCAL_C_INCLUDES += \
frameworks/av/media/libstagefright/codecs/amrnb/dec/src \
$(call include-path-for, audio-effects)
-LOCAL_CFLAGS += -fvisibility=hidden
-
-
+LOCAL_CFLAGS += -fvisibility=hidden -Wall -Wextra
include $(BUILD_SHARED_LIBRARY)
diff --git a/src/jni/rtp/AudioGroup.cpp b/src/jni/rtp/AudioGroup.cpp
index 55c6081..7ad3801 100644
--- a/src/jni/rtp/AudioGroup.cpp
+++ b/src/jni/rtp/AudioGroup.cpp
@@ -502,7 +502,7 @@ private:
int mMode;
int mSampleRate;
- int mSampleCount;
+ size_t mSampleCount;
int mDeviceSocket;
bool mPlatformHasAec;
@@ -786,7 +786,7 @@ bool AudioGroup::DeviceThread::threadLoop()
{
int mode = mGroup->mMode;
int sampleRate = mGroup->mSampleRate;
- int sampleCount = mGroup->mSampleCount;
+ size_t sampleCount = mGroup->mSampleCount;
int deviceSocket = mGroup->mDeviceSocket;
// Find out the frame count for AudioTrack and AudioRecord.
@@ -799,7 +799,7 @@ bool AudioGroup::DeviceThread::threadLoop()
ALOGE("cannot compute frame count");
return false;
}
- ALOGD("reported frame count: output %d, input %d", output, input);
+ ALOGD("reported frame count: output %zu, input %zu", output, input);
if (output < sampleCount * 2) {
output = sampleCount * 2;
@@ -807,7 +807,7 @@ bool AudioGroup::DeviceThread::threadLoop()
if (input < sampleCount * 2) {
input = sampleCount * 2;
}
- ALOGD("adjusted frame count: output %d, input %d", output, input);
+ ALOGD("adjusted frame count: output %zu, input %zu", output, input);
// Initialize AudioTrack and AudioRecord.
sp<AudioTrack> track = new AudioTrack();
diff --git a/src/jni/rtp/G711Codec.cpp b/src/jni/rtp/G711Codec.cpp
index ef54863..e2c25c8 100644
--- a/src/jni/rtp/G711Codec.cpp
+++ b/src/jni/rtp/G711Codec.cpp
@@ -34,7 +34,7 @@ const int8_t gExponents[128] = {
class UlawCodec : public AudioCodec
{
public:
- int set(int sampleRate, const char *fmtp) {
+ int set(int sampleRate, const char */* fmtp */) {
mSampleCount = sampleRate / 50;
return mSampleCount;
}
@@ -85,7 +85,7 @@ int UlawCodec::decode(int16_t *samples, int count, void *payload, int length)
class AlawCodec : public AudioCodec
{
public:
- int set(int sampleRate, const char *fmtp) {
+ int set(int sampleRate, const char */* fmtp */) {
mSampleCount = sampleRate / 50;
return mSampleCount;
}
diff --git a/src/jni/rtp/GsmCodec.cpp b/src/jni/rtp/GsmCodec.cpp
index 61dfdc9..4a04bfa 100644
--- a/src/jni/rtp/GsmCodec.cpp
+++ b/src/jni/rtp/GsmCodec.cpp
@@ -39,7 +39,7 @@ public:
}
}
- int set(int sampleRate, const char *fmtp) {
+ int set(int sampleRate, const char */* fmtp */) {
return (sampleRate == 8000 && mEncode && mDecode) ? 160 : -1;
}
diff --git a/src/jni/rtp/rtp_jni.cpp b/src/jni/rtp/rtp_jni.cpp
index 9f4bff9..a501f7d 100644
--- a/src/jni/rtp/rtp_jni.cpp
+++ b/src/jni/rtp/rtp_jni.cpp
@@ -21,7 +21,7 @@
extern int registerRtpStream(JNIEnv *env);
extern int registerAudioGroup(JNIEnv *env);
-__attribute__((visibility("default"))) jint JNI_OnLoad(JavaVM *vm, void *unused)
+__attribute__((visibility("default"))) jint JNI_OnLoad(JavaVM *vm, void *)
{
JNIEnv *env = NULL;
if (vm->GetEnv((void **)&env, JNI_VERSION_1_4) != JNI_OK ||