summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--heremaps-uc/src/heremaps-uc.c18
-rw-r--r--src/here_base.cpp2
-rw-r--r--src/here_manager.cpp2
-rw-r--r--src/here_userconsent.cpp2
4 files changed, 15 insertions, 9 deletions
diff --git a/heremaps-uc/src/heremaps-uc.c b/heremaps-uc/src/heremaps-uc.c
index 38a02dc..08da605 100644
--- a/heremaps-uc/src/heremaps-uc.c
+++ b/heremaps-uc/src/heremaps-uc.c
@@ -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);
diff --git a/src/here_base.cpp b/src/here_base.cpp
index 43a7fbe..42a4d18 100644
--- a/src/here_base.cpp
+++ b/src/here_base.cpp
@@ -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);
}
diff --git a/src/here_manager.cpp b/src/here_manager.cpp
index 77235f2..2c84038 100644
--- a/src/here_manager.cpp
+++ b/src/here_manager.cpp
@@ -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;
}
diff --git a/src/here_userconsent.cpp b/src/here_userconsent.cpp
index d88af57..4314e22 100644
--- a/src/here_userconsent.cpp
+++ b/src/here_userconsent.cpp
@@ -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]))) {