Fix some incorrect printf specifiers 88/265888/1
authorMichal Bloch <m.bloch@samsung.com>
Tue, 18 May 2021 19:40:36 +0000 (21:40 +0200)
committerINSUN PYO <insun.pyo@samsung.com>
Mon, 1 Nov 2021 08:48:05 +0000 (08:48 +0000)
Change-Id: Iae43060cd82d73c71c36dd9580e2d1110cb916a4
(cherry picked from commit 9b46484c08c05a91997034f503d9a9d1df0a6202)

ss_engine/SS_UPI.c
ss_engine/fota_tar.c

index 2606414a092a55947f7ce56b4e2cf07626af116d..f534a5d0efd698b21ee4330c8c4e270439978dd4 100755 (executable)
@@ -28,6 +28,7 @@ Function Prototypes Mandatory
 #include<ctype.h>
 #include<stdlib.h>
 #include<string.h>
+#include<stdint.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <sys/statfs.h>
@@ -1736,7 +1737,7 @@ int SS_FSUpdateFile(int ubFileType, ua_dataSS_t * ua_dataSS, int ulPatchCount, f
                                        ulResult = SS_Link(NULL, pFsNode->file_new_path, pFsNode->patch_name);
                                        if (ulResult != S_SS_SUCCESS) {
                                                LOGE("SS_Link Failed, Linkname:[%s], reference file name, index = [%d]:[%s]\n",
-                                               pFsNode->file_new_path, pFsNode->patch_name, ulFileIndex);
+                                               pFsNode->file_new_path, ulFileIndex, pFsNode->patch_name);
                                        }
                                } else {
                                        LOGE("Unlink Failed, result = [%d], index = [%d]\n", ulResult, ulFileIndex);
@@ -2075,7 +2076,7 @@ size_t SS_FSAvailiableFreeSpace(char *block_name)
        while (NULL != (ent = getmntent(aFile))) {
                if (strcmp(ent->mnt_fsname, block_name) == 0) {
                        if (statfs(ent->mnt_dir, &sb) == 0)
-                               LOGL(LOG_SSENGINE, "Total free space = %ld, blocks free = %ld\n", sb.f_bsize * sb.f_bavail, sb.f_bfree);
+                               LOGL(LOG_SSENGINE, "Total free space = %" PRIu64 ", blocks free = %" PRIu64 "\n", sb.f_bsize * sb.f_bavail, sb.f_bfree);
                }
        }
        endmntent(aFile);
index 6b617a53931f95656b8e8da42e1b195ac8e25030..f37ef1e4dc90a27f50e3c1aaedd0c61a5a4f717f 100755 (executable)
@@ -1008,7 +1008,7 @@ int tar_extract_folder(char *tar, char *item, char *path)
                                        snprintf(name + strlen(name), sizeof(name) - strlen(name),
                                                        "%s", buff + PREFIX_INDICATOR_BYTE);
                                        snprintf(dirPath, sizeof(dirPath), "%s/%s", path, name + folderpathlen);
-                                       LOG(" File Name is longer than 100 bytes -Remaining Str [%s]\n Full Str[%s]\n", dirPath);
+                                       LOG(" File Name is longer than 100 bytes -Remaining Str [%s]\n Full Str[%s]\n", dirPath, fullname);
                                } else {
                                        //LOG(" Extracting file %s\n", fullname);
                                        memset(dirPath, 0, sizeof(dirPath));