From 2db4fea4741aafcbb01b13b715c463777160454a Mon Sep 17 00:00:00 2001 From: Mok Jeongho Date: Fri, 1 Apr 2016 16:35:27 +0900 Subject: [PATCH] Fix build warning [Version] 5.0-64 [Profile] Common [Issue Type] Fix Warning Change-Id: Ibff741e3997bf34abf6c4144d9f0e79a9228244f --- packaging/pulseaudio.spec | 2 +- src/daemon/daemon-conf.c | 8 -------- src/modules/alsa/alsa-util.c | 6 +----- src/pulsecore/log.c | 12 ++++++++++++ src/pulsecore/protocol-native.c | 20 ++++++++------------ src/pulsecore/source.c | 2 +- 6 files changed, 23 insertions(+), 27 deletions(-) diff --git a/packaging/pulseaudio.spec b/packaging/pulseaudio.spec index 5d44b0d..2adcc78 100644 --- a/packaging/pulseaudio.spec +++ b/packaging/pulseaudio.spec @@ -10,7 +10,7 @@ Name: pulseaudio Summary: Improved Linux sound server Version: 5.0 -Release: 63 +Release: 64 Group: Multimedia/Audio License: LGPL-2.1+ URL: http://pulseaudio.org diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index 1dde213..dcd1950 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c @@ -192,14 +192,6 @@ int pa_daemon_conf_set_log_target(pa_daemon_conf *c, const char *string) { c->log_target = log_target; } -#ifdef USE_DLOG - else if (!strcmp(string, "dlog")) { - c->log_target = PA_LOG_DLOG; - } else if (!strcmp(string, "dlog-color")) { - c->log_target = PA_LOG_DLOG_COLOR; - } -#endif - return 0; } diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c index 37c0ec7..c20755a 100644 --- a/src/modules/alsa/alsa-util.c +++ b/src/modules/alsa/alsa-util.c @@ -719,10 +719,6 @@ snd_pcm_t *pa_alsa_open_by_device_string( char *d; snd_pcm_t *pcm_handle; bool reformat = false; -#ifdef __TIZEN__ - int ret = 0; - int hdmi_ch_enum_val = 0; -#endif pa_assert(device); pa_assert(ss); @@ -1474,7 +1470,7 @@ bool pa_alsa_pcm_is_modem(snd_pcm_t *pcm) { #ifdef __TIZEN__ pa_bool_t pa_alsa_pcm_is_voip(snd_pcm_t *pcm) { - char *id = NULL; + const char *id = NULL; snd_pcm_info_t* info; snd_pcm_info_alloca(&info); diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c index a79529d..52fcd19 100644 --- a/src/pulsecore/log.c +++ b/src/pulsecore/log.c @@ -169,6 +169,10 @@ int pa_log_set_target(pa_log_target *t) { #ifdef HAVE_SYSTEMD_JOURNAL case PA_LOG_JOURNAL: #endif +#ifdef USE_DLOG + case PA_LOG_DLOG: + case PA_LOG_DLOG_COLOR: +#endif case PA_LOG_NULL: break; case PA_LOG_FILE: @@ -747,6 +751,14 @@ char *pa_log_target_to_string(const pa_log_target *t) { string = pa_xstrdup("journal"); break; #endif +#ifdef USE_DLOG + case PA_LOG_DLOG: + string = pa_xstrdup("dlog"); + break; + case PA_LOG_DLOG_COLOR: + string = pa_xstrdup("dlog-color"); + break; +#endif case PA_LOG_NULL: string = pa_xstrdup("null"); break; diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index d4d6ecd..1387389 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -664,17 +664,16 @@ static void fix_record_buffer_attr_post(record_stream *s) { #ifdef __TIZEN__ static int get_buffer_attr_from_hal(pa_proplist* proplist, pa_buffer_attr* ret_attr) { - pa_log_debug("hal-latency - __TIZEN__ : get_buffer_attr_from_hal()"); uint32_t maxlength = 0; uint32_t tlength = 0; uint32_t prebuf = 0; uint32_t minreq = 0; uint32_t fragsize = 0; + const char* _propStr = NULL; + pa_log_debug("hal-latency - __TIZEN__ : get_buffer_attr_from_hal()"); pa_assert(ret_attr); - const char* _propStr = NULL; - if ((_propStr = pa_proplist_gets(proplist, "maxlength")) == NULL) { pa_log_debug("hal-latency - Failed to get maxlength from HAL"); return 0; @@ -783,8 +782,8 @@ static record_stream* record_stream_new( * Updates buffer_attr using HAL that is requested latency from client */ { - pa_log_info("hal-latency - __TIZEN__ : playback_stream_new()"); pa_buffer_attr hal_attr; + pa_log_info("hal-latency - __TIZEN__ : playback_stream_new()"); if (get_buffer_attr_from_hal(source_output->proplist, &hal_attr) == 1) { pa_log_info("hal-latency - __TIZEN__ : Updates buffer_attr"); *attr = hal_attr; @@ -1266,8 +1265,8 @@ static playback_stream* playback_stream_new( * Updates buffer_attr using HAL that is requested latency from client */ { - pa_log_info("hal-latency - __TIZEN__ : playback_stream_new()"); pa_buffer_attr hal_attr; + pa_log_info("hal-latency - __TIZEN__ : playback_stream_new()"); if (get_buffer_attr_from_hal(sink_input->proplist, &hal_attr) == 1) { pa_log_info("hal-latency - __TIZEN__ : Updates buffer_attr"); *a = hal_attr; @@ -4149,18 +4148,15 @@ static void command_cork_playback_stream_all(pa_pdispatch *pd, uint32_t command, pa_native_connection *c = PA_NATIVE_CONNECTION(userdata); uint32_t idx; uint32_t sink_idx; - pa_bool_t b; - playback_stream *s; + bool b; pa_sink_input* si; pa_sink* sink; - char* role = NULL; + const char *role = NULL; int ret; - char* is_manual_corked_str = NULL; - int is_manual_corked; + const char *is_manual_corked_str = NULL; + uint32_t is_manual_corked; pa_sink_input_state_t si_state; - void *state = NULL; - pa_native_connection_assert_ref(c); pa_assert(t); diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 053cda2..af61cc0 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -77,7 +77,7 @@ static void pa_source_volume_change_push(pa_source *s); static void pa_source_volume_change_flush(pa_source *s); #ifdef __TIZEN__ -static void __toggle_open_close_n_write_dump_source(pa_source *s, pa_memchunk *target) +static void __toggle_open_close_n_write_dump_source(pa_source *s, const pa_memchunk *target) { /* open file for dump pcm */ -- 2.7.4