Fix 64bit dlog format warnings 47/195647/2 accepted/tizen/unified/20181217.142419 submit/tizen/20181217.051135 submit/tizen/20181217.065327
authorTaesoo Jun <steve.jun@samsung.com>
Mon, 17 Dec 2018 04:49:11 +0000 (13:49 +0900)
committersaerome kim <saerome.kim@samsung.com>
Mon, 17 Dec 2018 05:00:08 +0000 (14:00 +0900)
Change-Id: I0dcfd1ada2a06239a6790ccc1e0507f94f6ab7d2

packaging/mtp-responder.spec
src/entity/mtp_object.c
src/mtp_cmd_handler.c
src/util/mtp_fs.c
src/util/mtp_support.c

index 9fdc539..137cc37 100755 (executable)
@@ -5,7 +5,7 @@ ExcludeArch: %arm aarch64
 
 Name:       mtp-responder
 Summary:    Media Transfer Protocol daemon (responder)
-Version:    0.0.32
+Version:    0.0.33
 Release:    1
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index 5c8f3a1..b5d43d6 100755 (executable)
@@ -483,12 +483,12 @@ mtp_bool _entity_check_child_obj_path(mtp_obj_t *obj,
        retv_if(obj == NULL, FALSE);
 
        if (strlen(dest_path) > MTP_MAX_PATHNAME_SIZE - 1) {
-               ERR("dest_path is too long[%d]\n", strlen(dest_path));
+               ERR("dest_path is too long[%zu]\n", strlen(dest_path));
                return FALSE;
        }
 
        if (strlen(src_path) > MTP_MAX_PATHNAME_SIZE - 1) {
-               ERR("src_path is too long[%d]\n", strlen(src_path));
+               ERR("src_path is too long[%zu]\n", strlen(src_path));
                return FALSE;
        }
 
@@ -524,7 +524,7 @@ mtp_bool _entity_check_child_obj_path(mtp_obj_t *obj,
                                sizeof(temp_chld_wpath) / WCHAR_SIZ, temp_chld_path);
                if (_util_wchar_len(temp_chld_wpath) >
                                MTP_MAX_PATHNAME_SIZE - 1) {
-                       ERR("Child Object Full Path is too long[%d]\n",
+                       ERR("Child Object Full Path is too long[%zu]\n",
                                        strlen(child_obj->file_path));
                        _prop_deinit_ptparray(&child_arr);
                        return FALSE;
@@ -542,7 +542,7 @@ mtp_bool _entity_check_child_obj_path(mtp_obj_t *obj,
                        g_strlcpy(dest_chld_path, dest_path,
                                        MTP_MAX_PATHNAME_SIZE + 1);
                } else {
-                       ERR("dest_chld_wpath is too long[%d]\n",
+                       ERR("dest_chld_wpath is too long[%zu]\n",
                                        strlen(dest_path));
                        _prop_deinit_ptparray(&child_arr);
                        return FALSE;
@@ -554,7 +554,7 @@ mtp_bool _entity_check_child_obj_path(mtp_obj_t *obj,
                        g_strlcat(dest_chld_path, ptr,
                                        MTP_MAX_PATHNAME_SIZE + 1);
                } else {
-                       ERR("dest_chld_path + ptr is too long[%d]\n",
+                       ERR("dest_chld_path + ptr is too long[%zu]\n",
                                        (strlen(ptr) + strlen(ptr)));
                        _prop_deinit_ptparray(&child_arr);
                        return FALSE;
index c3bbbab..7c50c55 100755 (executable)
@@ -2201,7 +2201,7 @@ static void __set_object_prop_list(mtp_handler_t *hdlr)
                _cmd_hdlr_send_response(hdlr, resp, 1, &i);
                g_free(blk.data);
 
-               ERR("invalid object format, bytes_left [%d]:[%u]\n", bytes_left,
+               ERR("invalid object format, bytes_left [%d]:[%zu]\n", bytes_left,
                                sizeof(mtp_uint32));
                return;
        }
index 0c4d48f..fdc3975 100755 (executable)
@@ -779,7 +779,7 @@ mtp_bool _util_get_filesystem_info_ext(mtp_char *storepath,
        }
 
        capacity = used_size = avail_size = (mtp_uint64)buf.f_bsize;
-       DBG("Block size : %d\n", buf.f_bsize);
+       DBG("Block size : %lu\n", (unsigned long)buf.f_bsize);
        capacity *= buf.f_blocks;
        used_size *= (buf.f_blocks - buf.f_bavail);
        avail_size *= buf.f_bavail;
index 3ef7136..f9221c2 100755 (executable)
@@ -237,7 +237,7 @@ size_t _util_wchar_len(const mtp_wchar *s)
                while (*temp++)
                        /* DO NOTHING */ ;
 
-               DBG("Length : %d\n", temp - s - 1);
+               DBG("Length : %zd\n", temp - s - 1);
                return ((size_t)(temp - s - 1));
        } else {                /* not-aligned, byte to byte approach - slow */
 
@@ -246,7 +246,7 @@ size_t _util_wchar_len(const mtp_wchar *s)
                while (*temp || *(temp + 1))
                        temp += 2;
 
-               DBG("Length : %d\n", (temp - (unsigned char *)s) / 2);
+               DBG("Length : %zd\n", (temp - (unsigned char *)s) / 2);
                return ((size_t) (temp - (unsigned char *)s) / 2);
        }
 }