Fix build warnings 75/242975/1 accepted/tizen/unified/20200904.035452 submit/tizen/20200902.103308 submit/tizen/20200903.061740
authorSeungbae Shin <seungbae.shin@samsung.com>
Wed, 2 Sep 2020 07:12:11 +0000 (16:12 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Wed, 2 Sep 2020 07:12:11 +0000 (16:12 +0900)
[Version] 13.0-19
[Issue Type] Build

Change-Id: I35eeecabad0dbb2b3eaf52bcd0fe394055edf96f

packaging/pulseaudio.spec
src/modules/alsa/alsa-sink.c
src/modules/bluetooth/module-bluez5-discover.c
src/modules/module-loopback.c
src/pulsecore/mutex-posix.c
src/pulsecore/proplist-util.c
src/pulsecore/sound-file-stream.c

index ff820f4..d8267f4 100644 (file)
@@ -3,7 +3,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          13.0
-Release:          18
+Release:          19
 Group:            Multimedia/Audio
 License:          LGPL-2.1
 URL:              http://pulseaudio.org
@@ -199,7 +199,6 @@ NOCONFIGURE=yes ./bootstrap.sh
         --disable-avahi \
         --disable-jack \
         --without-fftw \
-        --disable-bluez4 \
         --disable-systemd-login \
         --disable-gconf \
         --disable-gsettings \
index 8103848..5cd39f3 100644 (file)
@@ -515,7 +515,7 @@ static int try_recover(struct userdata *u, const char *call, int err) {
 
         snd_pcm_avail_delay(u->pcm_handle, &avail, &delay);
 
-        pa_log_error("%s: ringbuffer is full or stuck. avail(%d), delay(%d), state(%d)",
+        pa_log_error("%s: ringbuffer is full or stuck. avail(%ld), delay(%ld), state(%d)",
                 call, avail, delay, snd_pcm_state(u->pcm_handle));
 
         /* It will wait for not EAGAIN state and call pcm_resume and prepare */
index 7641586..99506c3 100644 (file)
@@ -92,13 +92,14 @@ static pa_hook_result_t device_connection_changed_cb(pa_bluetooth_discovery *y,
         pa_module *m;
 #ifdef __TIZEN_BT__
         const char *profile = NULL;
+        char *args = NULL;
 
         if (pa_bluetooth_device_sink_transport_connected(d))
             profile = "a2dp_sink";
         else if (pa_bluetooth_device_source_transport_connected(d))
             profile = "a2dp_source";
 
-        char *args = pa_sprintf_malloc("address=\"%s\" path=\"%s\" autodetect_mtu=%i profile=\"%s\"",
+        args = pa_sprintf_malloc("address=\"%s\" path=\"%s\" autodetect_mtu=%i profile=\"%s\"",
                                       d->address, d->path, (int)u->autodetect_mtu, pa_strnull(profile));
 #else
         char *args = pa_sprintf_malloc("path=%s autodetect_mtu=%i", d->path, (int)u->autodetect_mtu);
index 74d0dc0..5fe7f14 100644 (file)
@@ -401,7 +401,11 @@ static void adjust_rates(struct userdata *u) {
 
     /* Drop or insert samples if fast_adjust_threshold_msec was specified and the latency difference is too large. */
     if (u->fast_adjust_threshold > 0 && abs(latency_difference) > u->fast_adjust_threshold) {
+#ifdef __TIZEN__
+        pa_log_debug ("Latency difference larger than %llu msec, skipping or inserting samples.", u->fast_adjust_threshold / PA_USEC_PER_MSEC);
+#else
         pa_log_debug ("Latency difference larger than %lu msec, skipping or inserting samples.", u->fast_adjust_threshold / PA_USEC_PER_MSEC);
+#endif
 
         pa_asyncmsgq_send(u->sink_input->sink->asyncmsgq, PA_MSGOBJECT(u->sink_input), SINK_INPUT_MESSAGE_FAST_ADJUST, NULL, current_source_sink_latency, NULL);
 
@@ -519,13 +523,17 @@ static void update_latency_boundaries(struct userdata *u, pa_source *source, pa_
 static void memblockq_adjust(struct userdata *u, int64_t latency_offset_usec, bool allow_push) {
     size_t current_memblockq_length, requested_memblockq_length, buffer_correction;
     int64_t requested_buffer_latency;
+#ifdef __TIZEN__
+    pa_usec_t final_latency;
+#else
     pa_usec_t final_latency, requested_sink_latency;
+#endif
 
     final_latency = PA_MAX(u->latency, u->output_thread_info.minimum_latency);
 
 #ifdef __TIZEN__
     /* FIXME : rollback upstream code due to bluetooth sync issue */
-    requested_buffer_latency = PA_CLIP_SUB(final_latency, latency_offset_usec);
+    requested_buffer_latency = PA_CLIP_SUB((int64_t)final_latency, latency_offset_usec);
 #else
     /* If source or sink have some large negative latency offset, we might want to
      * hold more than final_latency in the memblockq */
index 60f56d3..03e390a 100644 (file)
@@ -94,10 +94,13 @@ pa_mutex* pa_mutex_new(bool recursive, bool inherit_priority) {
 }
 
 void pa_mutex_free(pa_mutex *m) {
+#ifdef __TIZEN__
+    int ret;
+#endif
     pa_assert(m);
 
 #ifdef __TIZEN__
-    int ret = pthread_mutex_destroy(&m->mutex);
+    ret = pthread_mutex_destroy(&m->mutex);
     if (ret != 0)
         pa_log_error("pthread_mutex_destroy [%p] error [%d], (%d/%d)", &m->mutex, ret, m->lock, m->unlock);
     pa_assert_se(ret == 0);
@@ -108,10 +111,13 @@ void pa_mutex_free(pa_mutex *m) {
 }
 
 void pa_mutex_lock(pa_mutex *m) {
+#ifdef __TIZEN__
+    int ret;
+#endif
     pa_assert(m);
 
 #ifdef __TIZEN__
-    int ret = pthread_mutex_lock(&m->mutex);
+    ret = pthread_mutex_lock(&m->mutex);
     if (ret != 0)
         pa_log_error("pthread_mutex_lock [%p] error [%d], (%d/%d)", &m->mutex, ret, m->lock, m->unlock);
     pa_assert_se(ret == 0);
@@ -134,10 +140,13 @@ bool pa_mutex_try_lock(pa_mutex *m) {
 }
 
 void pa_mutex_unlock(pa_mutex *m) {
+#ifdef __TIZEN__
+    int ret;
+#endif
     pa_assert(m);
 
 #ifdef __TIZEN__
-    int ret = pthread_mutex_unlock(&m->mutex);
+    ret = pthread_mutex_unlock(&m->mutex);
     if (ret != 0)
         pa_log_error("pthread_mutex_unlock [%p] error [%d], (%d/%d)", &m->mutex, ret, m->lock, m->unlock);
     pa_assert_se(ret == 0);
index 20ebd32..ccc6699 100644 (file)
@@ -267,7 +267,11 @@ char *pa_proplist_get_stream_group(pa_proplist *p, const char *prefix, const cha
     else if ((r = pa_proplist_gets(p, PA_PROP_MEDIA_NAME)))
         t = pa_sprintf_malloc("%s-by-media-name:%s", prefix, r);
     else
+#ifdef __TIZEN__
+        t = pa_sprintf_malloc("%s-fallback:%s", prefix, pa_strnull(r));
+#else
         t = pa_sprintf_malloc("%s-fallback:%s", prefix, r);
+#endif
 
     if (cache)
         pa_proplist_sets(p, cache, t);
index 8a5aaf9..55e0144 100644 (file)
@@ -389,7 +389,7 @@ int pa_play_file_repeat(
     u->sndfile = NULL;
     u->readf_function = NULL;
     u->memblockq = NULL;
-    u->repeat = (repeat == 0) ? -1 : repeat;
+    u->repeat = (repeat == 0) ? -1 : (int32_t)repeat;
 
     if ((fd = pa_open_cloexec(fname, O_RDONLY, 0)) < 0) {
         pa_log("Failed to open file %s: %s", fname, pa_cstrerror(errno));