Fix build warnings 45/160245/1
authorSeungbae Shin <seungbae.shin@samsung.com>
Tue, 14 Nov 2017 09:13:11 +0000 (18:13 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Wed, 15 Nov 2017 03:59:54 +0000 (12:59 +0900)
[Version] 0.12.3
[Issue Type] Warning

Change-Id: I16f7dafeb0a7fb70971255ffedeb8490b4b1d6f3

focus_server/mm_sound_mgr_focus.c
mm_sound.c
mm_sound_device.c
mm_sound_pa_client.c
packaging/libmm-sound.spec
server/mm_sound_mgr_codec.c
server/mm_sound_mgr_ipc.c
server/plugin/tone/mm_sound_plugin_codec_tone.c

index 5aaea0c..b2c961e 100644 (file)
@@ -855,7 +855,7 @@ int mm_sound_mgr_focus_destroy_node(const _mm_sound_mgr_focus_param_t *param)
                                        if (node->taken_by_id[i].handle_id == new_param->handle_id || node->taken_by_id[i].by_session) {
                                                /* do callback for resumption */
                                                if ((ret = _mm_sound_mgr_focus_do_callback(FOCUS_COMMAND_ACQUIRE, node, new_param)))
-                                                       debug_error("Fail to _focus_do_callback for COMMAND ACQUIRE to node[%x], ret[0x%x]", node, ret);
+                                                       debug_error("Fail to _focus_do_callback for COMMAND ACQUIRE to node[%p], ret[0x%x]", node, ret);
                                                if (!strncmp(my_node->stream_type, node->stream_type, MAX_STREAM_TYPE_LEN)) {
                                                        need_to_trigger_watch_cb = false;
                                                        my_node->status &= ~(new_param->request_type);
@@ -1111,7 +1111,7 @@ int mm_sound_mgr_focus_request_acquire(const _mm_sound_mgr_focus_param_t *param)
                                if (my_node->priority >= node->priority) {
                                        /* do callback for interruption */
                                        if ((ret = _mm_sound_mgr_focus_do_callback(FOCUS_COMMAND_RELEASE, node, param_s))) {
-                                               debug_error("Fail to _focus_do_callback for COMMAND RELEASE to node[%x], ret[0x%x]", node, ret);
+                                               debug_error("Fail to _focus_do_callback for COMMAND RELEASE to node[%p], ret[0x%x]", node, ret);
                                                /* but, keep going */
                                                ret = MM_ERROR_NONE;
                                        }
@@ -1237,7 +1237,7 @@ int mm_sound_mgr_focus_request_release(const _mm_sound_mgr_focus_param_t *param)
                                                }
                                                /* do callback for resumption */
                                                if ((ret = _mm_sound_mgr_focus_do_callback(FOCUS_COMMAND_ACQUIRE, node, param_s)))
-                                                       debug_error("Fail to _focus_do_callback for COMMAND ACQUIRE to node[%x], ret[0x%x]", node, ret);
+                                                       debug_error("Fail to _focus_do_callback for COMMAND ACQUIRE to node[%p], ret[0x%x]", node, ret);
                                                if (!strncmp(my_node->stream_type, node->stream_type, MAX_STREAM_TYPE_LEN))
                                                        need_to_trigger_watch_cb = false;
 
index 333d2de..11097ad 100644 (file)
@@ -423,7 +423,7 @@ int mm_sound_play_tone_ex(MMSoundTone_t num, int volume_config, const double vol
                return MM_ERROR_INVALID_ARGUMENT;
        }
        if (volume < 0.0 || volume > 1.0) {
-               debug_error("Volume Value is invalid %d", volume);
+               debug_error("Volume Value is invalid %f", volume);
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
index 23935dd..48cae29 100644 (file)
@@ -366,7 +366,7 @@ int mm_sound_get_next_device(MMSoundDeviceList_t device_list, MMSoundDevice_t *d
                        device_list_t->list = node;
 
                *device = (mm_sound_device_t*)node->data;
-               debug_log("next device[0x%x]", *device);
+               debug_log("next device[%p]", *device);
        }
        return ret;
 }
@@ -389,7 +389,7 @@ int mm_sound_get_prev_device(MMSoundDeviceList_t device_list, MMSoundDevice_t *d
        } else {
                device_list_t->list = node;
                *device = (mm_sound_device_t*)node->data;
-               debug_log("previous device[0x%x]", *device);
+               debug_log("previous device[%p]", *device);
        }
        return ret;
 }
@@ -403,7 +403,7 @@ int mm_sound_get_device_type(MMSoundDevice_t device_h, mm_sound_device_type_e *t
                return MM_ERROR_INVALID_ARGUMENT;
        }
        __convert_device_type_to_enum(device->type, type);
-       debug_log("device_handle:0x%x, type:%d", device, *type);
+       debug_log("device_handle:%p, type:%d", device, *type);
 
        return MM_ERROR_NONE;
 }
@@ -417,7 +417,7 @@ int mm_sound_get_device_io_direction(MMSoundDevice_t device_h, mm_sound_device_i
                return MM_ERROR_INVALID_ARGUMENT;
        }
        *io_direction = device->io_direction;
-       debug_log("device_handle:0x%x, io_direction:%d (1:IN,2:OUT,3:INOUT)", device, *io_direction);
+       debug_log("device_handle:%p, io_direction:%d (1:IN,2:OUT,3:INOUT)", device, *io_direction);
 
        return MM_ERROR_NONE;
 }
@@ -431,7 +431,7 @@ int mm_sound_get_device_id(MMSoundDevice_t device_h, int *id)
                return MM_ERROR_INVALID_ARGUMENT;
        }
        *id = device->id;
-       debug_log("device_handle:0x%x, id:%d", device, *id);
+       debug_log("device_handle:%p, id:%d", device, *id);
 
        return MM_ERROR_NONE;
 }
@@ -445,7 +445,7 @@ int mm_sound_get_device_state(MMSoundDevice_t device_h, mm_sound_device_state_e
                return MM_ERROR_INVALID_ARGUMENT;
        }
        *state = device->state;
-       debug_log("device_handle:0x%x, state:%d (0:INACTIVATED,1:ACTIVATED)", device, *state);
+       debug_log("device_handle:%p, state:%d (0:INACTIVATED,1:ACTIVATED)", device, *state);
 
        return MM_ERROR_NONE;
 }
@@ -459,7 +459,7 @@ int mm_sound_get_device_name(MMSoundDevice_t device_h, char **name)
                return MM_ERROR_INVALID_ARGUMENT;
        }
        *name = device->name;
-       debug_log("device_handle:0x%x, name:%s", device, *name);
+       debug_log("device_handle:%p, name:%s", device, *name);
 
        return MM_ERROR_NONE;
 }
@@ -473,7 +473,7 @@ int mm_sound_get_device_vendor_id(MMSoundDevice_t device_h, int *vendor_id)
                return MM_ERROR_INVALID_ARGUMENT;
        }
        *vendor_id = device->vendor_id;
-       debug_log("device_handle:0x%x, vendor id:%04x", device, *vendor_id);
+       debug_log("device_handle:%p, vendor id:%04x", device, *vendor_id);
 
        return MM_ERROR_NONE;
 }
@@ -487,7 +487,7 @@ int mm_sound_get_device_product_id(MMSoundDevice_t device_h, int *product_id)
                return MM_ERROR_INVALID_ARGUMENT;
        }
        *product_id = device->product_id;
-       debug_log("device_handle:0x%x, product id:%04x", device, *product_id);
+       debug_log("device_handle:%p, product id:%04x", device, *product_id);
 
        return MM_ERROR_NONE;
 }
@@ -540,4 +540,4 @@ int mm_sound_is_device_running(MMSoundDevice_t device_h, bool *is_running)
        debug_log("device_handle:0x%x, running:%d", device, *is_running);
 
        return MM_ERROR_NONE;
-}
\ No newline at end of file
+}
index f331330..de0cb33 100644 (file)
@@ -120,7 +120,7 @@ void __mm_sound_pa_deinit(void)
        mm_sound_handle_mgr.handle_count = 0;
 
        if (mm_sound_handle_mgr.state) {
-               debug_msg("mainloop(%x),  context(%x)", mm_sound_handle_mgr.mainloop, mm_sound_handle_mgr.context);
+               debug_msg("mainloop(%p),  context(%p)", mm_sound_handle_mgr.mainloop, mm_sound_handle_mgr.context);
                pa_threaded_mainloop_stop(mm_sound_handle_mgr.mainloop);
                pa_context_disconnect(mm_sound_handle_mgr.context);
                pa_context_unref(mm_sound_handle_mgr.context);
@@ -391,7 +391,7 @@ int mm_sound_pa_open(MMSoundHandleMode mode, int volume_config, pa_sample_spec *
        }
 
        debug_msg
-               ("created handle[%d]. mode(%d), volumetype(%d), gain(%d), rate(%d), channels(%d), format(%d), stream_idx(%d), s(%x), source_type(%d)",
+               ("created handle[%d]. mode(%d), volumetype(%d), gain(%d), rate(%d), channels(%d), format(%d), stream_idx(%d), s(%p), source_type(%d)",
                 handle->handle, handle->mode, handle->volume_type, handle->gain_type, handle->rate, handle->channels, ss->format,
                 handle->stream_idx, handle->s, handle->source_type);
 
@@ -429,7 +429,7 @@ int mm_sound_pa_write(const int handle, void *buf, const int size)
        GET_HANDLE_DATA(phandle, mm_sound_handle_mgr.handles, &handle, __mm_sound_handle_comparefunc);
 
 #ifdef __STREAM_DEBUG__
-       debug_msg("phandle(%x) s(%x), handle(%d), rate(%d), ch(%d) stream_idx(%d), buf(%p), size(%d)",
+       debug_msg("phandle(%p) s(%p), handle(%d), rate(%d), ch(%d) stream_idx(%d), buf(%p), size(%d)",
                          phandle, phandle->s, phandle->handle, phandle->rate, phandle->channels, phandle->stream_idx.buf, size);
 #endif
 
@@ -460,7 +460,7 @@ int mm_sound_pa_close(const int handle)
                return MM_ERROR_SOUND_INTERNAL;
        }
 
-       debug_msg("phandle(%x) s(%x), handle(%d), rate(%d), ch(%d) stream_idx(%d)",
+       debug_msg("phandle(%p) s(%p), handle(%d), rate(%d), ch(%d) stream_idx(%d)",
                          phandle, phandle->s, phandle->handle, phandle->rate, phandle->channels, phandle->stream_idx);
 
        switch (phandle->mode) {
index 11ec021..7fd5a1f 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.12.2
+Version:    0.12.3
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index eb31ed9..8452e54 100644 (file)
@@ -436,7 +436,7 @@ int MMSoundMgrCodecPlay(int *slotid, const mmsound_mgr_codec_param_t *param)
        debug_msg("Using Slotid : [%d] Slot Status : [%d]", *slotid, g_slots[*slotid].status);
 
        err = g_plugins[g_slots[*slotid].pluginid].Create(&codec_param, &info, &(g_slots[*slotid].plughandle));
-       debug_msg("Created audio handle : [%d]", g_slots[*slotid].plughandle);
+       debug_msg("Created audio handle : [%p]", g_slots[*slotid].plughandle);
        if (err != MM_ERROR_NONE) {
                debug_error("Plugin create fail : 0x%08X", err);
                g_slots[*slotid].status = STATUS_IDLE;
@@ -702,7 +702,7 @@ int MMSoundMgrCodecPlayDtmf(int *slotid, const mmsound_mgr_codec_param_t *param)
 #endif
 
        err = g_plugins[g_slots[*slotid].pluginid].Create(&codec_param, &info, &(g_slots[*slotid].plughandle));
-       debug_msg("Created audio handle : [%d]", g_slots[*slotid].plughandle);
+       debug_msg("Created audio handle : [%p]", g_slots[*slotid].plughandle);
        if (err != MM_ERROR_NONE) {
                debug_error("Plugin create fail : 0x%08X", err);
                g_slots[*slotid].status = STATUS_IDLE;
@@ -817,7 +817,7 @@ int MMSoundMgrCodecPlayDtmfWithStreamInfo(int *slotid, const mmsound_mgr_codec_p
 #endif
 
        err = g_plugins[g_slots[*slotid].pluginid].Create(&codec_param, &info, &(g_slots[*slotid].plughandle));
-       debug_msg("Created audio handle : [%d]", g_slots[*slotid].plughandle);
+       debug_msg("Created audio handle : [%p]", g_slots[*slotid].plughandle);
        if (err != MM_ERROR_NONE) {
                debug_error("Plugin create fail : 0x%08X", err);
                g_slots[*slotid].status = STATUS_IDLE;
index f4bd3a8..bb3c432 100644 (file)
@@ -136,7 +136,7 @@ int _MMSoundMgrIpcPlayDTMF(int tone, int repeat, int volume, int volume_config,
 
        debug_msg("DTMF %d", param.tone);
        debug_msg("Loop %d", param.repeat_count);
-       debug_msg("Volume %d", param.volume);
+       debug_msg("Volume %f", param.volume);
        debug_msg("VolumeConfig %x", param.volume_config);
        debug_msg("session %d", param.session_type);
        debug_msg("session options %x", param.session_options);
@@ -167,7 +167,7 @@ int _MMSoundMgrIpcPlayDTMFWithStreamInfo(int tone, int repeat, int volume, int c
 
        debug_msg("DTMF %d", param.tone);
        debug_msg("Loop %d", param.repeat_count);
-       debug_msg("Volume %d", param.volume);
+       debug_msg("Volume %f", param.volume);
        debug_msg("stream type %s", param.stream_type);
        debug_msg("stream index %d", param.stream_index);
 
index bf612a0..e52c171 100644 (file)
@@ -848,7 +848,7 @@ int MMSoundPlugCodecToneDestroy(MMHandleType handle)
                return MM_ERROR_SOUND_INTERNAL;
        }
 
-       debug_enter("(handle %x)", handle);
+       debug_enter("(handle %p)", handle);
 
        pthread_mutex_destroy(&toneInfo->mutex);
        if (toneInfo)
@@ -863,7 +863,7 @@ int MMSoundPlugCodecTonePlay(MMHandleType handle)
 {
        tone_info_t *toneInfo = (tone_info_t *) handle;
 
-       debug_enter("(handle %x)", handle);
+       debug_enter("(handle %p)", handle);
        pthread_mutex_lock(&toneInfo->mutex);
        toneInfo->state = STATE_BEGIN;
        pthread_mutex_unlock(&toneInfo->mutex);
@@ -1160,7 +1160,7 @@ int MMSoundPlugCodecToneStop(MMHandleType handle)
 {
        tone_info_t *toneInfo = (tone_info_t*) handle;
 
-       debug_enter("(handle %x)", handle);
+       debug_enter("(handle %p)", handle);
        pthread_mutex_lock(&toneInfo->mutex);
        /*If stopped why stop again*/
        if (toneInfo->state == STATE_NONE || toneInfo->state == STATE_STOP) {
@@ -1184,7 +1184,7 @@ int MMSoundPlugCodecToneStop(MMHandleType handle)
 static
 int MMSoundPlugCodecToneSetThreadPool(int (*func)(void*, void (*)(void*)))
 {
-       debug_enter("(func : 0x%x)", func);
+       debug_enter("(func : %p)", func);
        g_thread_pool_func = func;
        debug_leave();
        return MM_ERROR_NONE;