diff options
author | Chih-Wei Huang <cwhuang@linux.org.tw> | 2019-02-22 18:47:57 +0800 |
---|---|---|
committer | Chih-Wei Huang <cwhuang@linux.org.tw> | 2019-02-25 16:20:51 +0800 |
commit | a0dc7a5d2137f806f12a31c7db91efe2f2cabbbe (patch) | |
tree | 44363870b6e8773411a7d909b80c8397933d55cd | |
parent | f2ca20dae03c006a15c74f96f2709d2a99d40f7d (diff) | |
download | platform_hardware_libaudio-a0dc7a5d2137f806f12a31c7db91efe2f2cabbbe.tar.gz platform_hardware_libaudio-a0dc7a5d2137f806f12a31c7db91efe2f2cabbbe.tar.bz2 platform_hardware_libaudio-a0dc7a5d2137f806f12a31c7db91efe2f2cabbbe.zip |
Fix building warnings
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | audio_hw.c | 5 | ||||
-rw-r--r-- | audio_route.c | 28 |
3 files changed, 4 insertions, 31 deletions
@@ -35,4 +35,6 @@ LOCAL_C_INCLUDES := \ external/tinyalsa/include \ $(call include-path-for, audio-utils) +LOCAL_CFLAGS := -Wno-unused-variable + include $(BUILD_SHARED_LIBRARY) @@ -554,8 +554,8 @@ static ssize_t read_frames(struct stream_in *in, void *buffer, ssize_t frames) &frames_rd); } else { struct resampler_buffer buf = { - { raw : NULL, }, - frame_count : frames_rd, + { .raw = NULL, }, + .frame_count = frames_rd, }; get_next_buffer(&in->buf_provider, &buf); if (buf.raw != NULL) { @@ -1117,7 +1117,6 @@ static int adev_open_output_stream(struct audio_hw_device *dev, *stream_out = &out->stream; return 0; -err_open: free(out); *stream_out = NULL; return ret; diff --git a/audio_route.c b/audio_route.c index f8b4e03..09ef164 100644 --- a/audio_route.c +++ b/audio_route.c @@ -72,24 +72,6 @@ struct config_parse_state { /* path functions */ -static void path_free(struct audio_route *ar) -{ - unsigned int i; - - if (!ar) { - ALOGE("%s: invalid audio_route", __FUNCTION__); - return; - } - - for (i = 0; i < ar->num_mixer_paths; i++) { - if (ar->mixer_path[i].name) - free(ar->mixer_path[i].name); - if (ar->mixer_path[i].setting) - free(ar->mixer_path[i].setting); - } - free(ar->mixer_path); -} - static struct mixer_path *path_get_by_name(struct audio_route *ar, const char *name) { @@ -206,16 +188,6 @@ static int path_add_path(struct mixer_path *path, struct mixer_path *sub_path) return 0; } -static void path_print(struct mixer_path *path) -{ - unsigned int i; - - ALOGV("Path: %s, length: %d", path->name, path->length); - for (i = 0; i < path->length; i++) - ALOGV(" %d: %s -> %d", i, mixer_ctl_get_name(path->setting[i].ctl), - path->setting[i].value); -} - static int path_apply(struct audio_route *ar, struct mixer_path *path) { unsigned int i; |