Be stricter about warnings
Test: build for several platforms
Change-Id: I8d66a74c72713f3cd7021b1924f72ea4a9e11c15
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c
index 35901e4..55a5c3b 100644
--- a/modules/audio/audio_hw.c
+++ b/modules/audio/audio_hw.c
@@ -297,11 +297,9 @@
{
ALOGV("adev_open_output_stream...");
- struct stub_audio_device *ladev = (struct stub_audio_device *)dev;
- struct stub_stream_out *out;
- int ret;
-
- out = (struct stub_stream_out *)calloc(1, sizeof(struct stub_stream_out));
+ *stream_out = NULL;
+ struct stub_stream_out *out =
+ (struct stub_stream_out *)calloc(1, sizeof(struct stub_stream_out));
if (!out)
return -ENOMEM;
@@ -325,11 +323,6 @@
*stream_out = &out->stream;
return 0;
-
-err_open:
- free(out);
- *stream_out = NULL;
- return ret;
}
static void adev_close_output_stream(struct audio_hw_device *dev,
@@ -424,11 +417,8 @@
{
ALOGV("adev_open_input_stream...");
- struct stub_audio_device *ladev = (struct stub_audio_device *)dev;
- struct stub_stream_in *in;
- int ret;
-
- in = (struct stub_stream_in *)calloc(1, sizeof(struct stub_stream_in));
+ *stream_in = NULL;
+ struct stub_stream_in *in = (struct stub_stream_in *)calloc(1, sizeof(struct stub_stream_in));
if (!in)
return -ENOMEM;
@@ -450,11 +440,6 @@
*stream_in = &in->stream;
return 0;
-
-err_open:
- free(in);
- *stream_in = NULL;
- return ret;
}
static void adev_close_input_stream(struct audio_hw_device *dev,
@@ -483,7 +468,6 @@
ALOGV("adev_open: %s", name);
struct stub_audio_device *adev;
- int ret;
if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0)
return -EINVAL;