hikey: audio: Clean up warnings
Change-Id: I3e0b49688a6ab709d3619d6e79ed9ac94448fc76
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 87fc4c6..a62c344 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -132,7 +132,6 @@
static size_t out_get_buffer_size(const struct audio_stream *stream)
{
ALOGV("out_get_buffer_size: %d", 4096);
- struct alsa_stream_out *out = (struct alsa_stream_out *)stream;
/* return the closest majoring multiple of 16 frames, as
* audioflinger expects audio buffers to be a multiple of 16 frames */
@@ -200,7 +199,6 @@
struct alsa_stream_out *out = (struct alsa_stream_out *)stream;
struct alsa_audio_device *adev = out->dev;
struct str_parms *parms;
- char *str;
char value[32];
int ret, val = 0;
@@ -251,7 +249,6 @@
struct alsa_audio_device *adev = out->dev;
size_t frame_size = audio_stream_out_frame_size(stream);
size_t out_frames = bytes / frame_size;
- int kernel_frames;
struct misc_io_pcm_buf_param pcmbuf;
/* acquiring hw device mutex systematically is useful if a low priority thread is waiting
@@ -589,7 +586,7 @@
return 320;
}
-static int adev_open_input_stream(struct audio_hw_device *dev,
+static int adev_open_input_stream(struct audio_hw_device __unused *dev,
audio_io_handle_t handle,
audio_devices_t devices,
struct audio_config *config,
@@ -598,11 +595,9 @@
const char *address __unused,
audio_source_t source __unused)
{
- ALOGV("adev_open_input_stream...");
-
- struct stub_audio_device *ladev = (struct stub_audio_device *)dev;
struct stub_stream_in *in;
- int ret;
+
+ ALOGV("adev_open_input_stream...");
in = (struct stub_stream_in *)calloc(1, sizeof(struct stub_stream_in));
if (!in)
@@ -655,10 +650,9 @@
static int adev_open(const hw_module_t* module, const char* name,
hw_device_t** device)
{
- ALOGV("adev_open: %s", name);
-
struct alsa_audio_device *adev;
- int ret;
+
+ ALOGV("adev_open: %s", name);
if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0)
return -EINVAL;