fix warning for VD 63/162663/1 accepted/tizen/unified/20171205.060714 submit/tizen/20171205.013143
authorjomui <jongmun.woo@samsung.com>
Tue, 5 Dec 2017 01:25:10 +0000 (10:25 +0900)
committerjomui <jongmun.woo@samsung.com>
Tue, 5 Dec 2017 01:25:22 +0000 (10:25 +0900)
Signed-off-by: jomui <jongmun.woo@samsung.com>
Change-Id: I9928a19d41a942c5e6f0850c9c92a239610ee5d6

heremaps-uc/src/heremaps-uc.c
src/here_base.cpp
src/here_manager.cpp
src/here_userconsent.cpp

index 38a02dc54c24bcced6ba1da2bcdfb3f7f979a6b6..08da6055c4984d90543d074fccbb52695e33615b 100644 (file)
@@ -185,6 +185,15 @@ static void anchor_clicked_cb(void *data, Evas_Object *obj, void *event_info)
        app_control_destroy(ac);
 }
 
+static void get_content(char *buf, char *fmt, ...)
+{
+       va_list ap;
+
+       va_start(ap, fmt);
+       vsnprintf(buf, 4096, fmt, ap);
+       va_end(ap);
+}
+
 static Evas_Object *create_popup_tv(Evas_Object *layout, heremaps_uc_app_data *ad)
 {
        LS_FUNC_ENTER
@@ -196,10 +205,9 @@ static Evas_Object *create_popup_tv(Evas_Object *layout, heremaps_uc_app_data *a
        elm_object_part_text_set(popup, "title,text", P_("IDS_POSITIONING_CONSENT_TITLE"));
 
        char buf[4096] = {0};
-       char *str1 = P_("IDS_POSITIONING_CONSENT_BODY");
        char *str2 = "<color=#006fd1ff underline=on underline_color=#006fd1ff><a href=http://here.com/terms/service-terms>http://here.com/terms/service-terms</a></color>";
        char *str3 = "<color=#006fd1ff underline=on underline_color=#006fd1ff><a href=http://here.com/privacy/privacy-policy>http://here.com/privacy/privacy-policy</a></color>";
-       snprintf(buf, 4096, str1, str2, str3);
+       get_content(buf, P_("IDS_POSITIONING_CONSENT_BODY"), str2, str3);
        char *text = strdup(buf);
        elm_object_text_set(popup, text);
 
@@ -246,10 +254,9 @@ static Evas_Object *create_popup_wearable(Evas_Object *layout, heremaps_uc_app_d
        evas_object_show(box);
 
        char buf[4096] = {0};
-       char *str1 = P_("IDS_POSITIONING_CONSENT_BODY");
        char *str2 = "http://here.com/terms/service-terms";
        char *str3 = "http://here.com/privacy/privacy-policy";
-       snprintf(buf, 4096, str1, str2, str3);
+       get_content(buf, P_("IDS_POSITIONING_CONSENT_BODY"), str2, str3);
        char *text = strdup(buf);
 
        Evas_Object *entry = elm_entry_add(box);
@@ -293,10 +300,9 @@ static Evas_Object *create_popup(Evas_Object *layout, heremaps_uc_app_data *ad)
        evas_object_show(box);
 
        char buf[4096] = {0};
-       char *str1 = P_("IDS_POSITIONING_CONSENT_BODY");
        char *str2 = "<color=#006fd1ff underline=on underline_color=#006fd1ff><a href=http://here.com/terms/service-terms>http://here.com/terms/service-terms</a></color>";
        char *str3 = "<color=#006fd1ff underline=on underline_color=#006fd1ff><a href=http://here.com/privacy/privacy-policy>http://here.com/privacy/privacy-policy</a></color>";
-       snprintf(buf, 4096, str1, str2, str3);
+       get_content(buf, P_("IDS_POSITIONING_CONSENT_BODY"), str2, str3);
        char *text = strdup(buf);
 
        Evas_Object *entry = elm_entry_add(box);
index 43a7fbef9525d5bec072e63bb2d3a9c925711388..42a4d180dfa41f4792087ccde8d4871c85426123 100644 (file)
@@ -122,7 +122,7 @@ gint HereBase::GetErrorCode(const BaseReply& Reply)
 
        if (error != MAPS_ERROR_NONE) {
                if (errMsg.size() > 0) errMsg += ". ";
-               MAPS_LOGE("ERROR: %s%s (%s, %ld)", errMsg.data(),
+               MAPS_LOGE("ERROR: %s%s (%s, %d)", errMsg.data(),
                        ConverHereErrorToString(ConvertToHereError(error)),
                        ConvertMapsErrorToChar(error), error);
        }
index 77235f2d503c2b1549eb48bc81429d659ee78980..2c8403878c9f4092a35475d1d5ef73145db37612 100644 (file)
@@ -213,7 +213,7 @@ here_error_e HereManager::SetCredentials(void)
        nProcessId = getpid();
        nRet = app_manager_get_app_id(nProcessId, &strAppId);
        if (nRet != APP_MANAGER_ERROR_NONE) {
-               MAPS_LOGI("Get app_id [%ld]. nRet[%d]", nProcessId, nRet);
+               MAPS_LOGI("Get app_id [%d]. nRet[%d]", (int)nProcessId, nRet);
                return HERE_ERROR_NONE;
        }
 
index d88af57d0adeb84b123d87a0ace360206cf7f933..4314e22864dd4f2d3dba103b50aaf4ffbfe6a120 100644 (file)
@@ -109,7 +109,7 @@ here_error_e HereUserConsent::GetUserConsent(bool *consent)
 
                ret = app_manager_get_app_id(nProcessId, &strAppId);
                if (ret != APP_MANAGER_ERROR_NONE) {
-                       MAPS_LOGI("Get app_id [%ld]. nRet[%d]", nProcessId, ret);
+                       MAPS_LOGI("Get app_id [%d]. nRet[%d]", (int)nProcessId, ret);
                } else {
                        for (int i = 0; i < testAppIdCount; i++) {
                                if (!strncmp(strAppId, testAppIdList[i], strlen(testAppIdList[i]))) {