From 0b22c52fcf7b6cfa046e910f1be02ea1b8c60469 Mon Sep 17 00:00:00 2001 From: hyunho Date: Tue, 31 Dec 2019 10:47:54 +0900 Subject: [PATCH] Fix build warning based on GCC-9 Change-Id: I9f4c22f4186108ac37738d25d633d2fd88565610 Signed-off-by: hyunho --- src/widget_instance.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/widget_instance.c b/src/widget_instance.c index bea1c71..19cf3cd 100644 --- a/src/widget_instance.c +++ b/src/widget_instance.c @@ -415,11 +415,11 @@ static int __send_aul_cmd(widget_instance_h instance, const char *command, bundl static int __set_width(bundle *content_info, int w) { - char wbuf[6]; + char wbuf[11]; if (content_info == NULL || w < 0) return -1; - snprintf(wbuf, 6, "%d", w); + snprintf(wbuf, 11, "%d", w); bundle_add_str(content_info, WIDGET_K_WIDTH, wbuf); return 0; @@ -427,11 +427,11 @@ static int __set_width(bundle *content_info, int w) static int __set_height(bundle *content_info, int h) { - char hbuf[6]; + char hbuf[11]; if (content_info == NULL || h < 0) return -1; - snprintf(hbuf, 6, "%d", h); + snprintf(hbuf, 11, "%d", h); bundle_add_str(content_info, WIDGET_K_HEIGHT, hbuf); return 0; @@ -440,7 +440,7 @@ static int __set_height(bundle *content_info, int h) EAPI int widget_instance_launch(const char *instance_id, char *content_info, int w, int h) { int ret = 0; - char pid_buf[6]; + char pid_buf[11]; bundle *b; widget_instance_h instance; @@ -773,7 +773,7 @@ static int __widget_instance_handler(int status, char *widget_id, struct _widget_instance *instance; if (instance_id == NULL) { - _E("undefined class or instance %s of %s", instance_id, widget_id); + _E("undefined class or instance of %s", widget_id); return 0; } @@ -846,7 +846,7 @@ static int __widget_handler(const char *viewer_id, aul_app_com_result_e e, bundl bundle_get_byte(envelope, AUL_K_WIDGET_STATUS, (void **)&status, &status_sz); if (widget_id == NULL) { - LOGE("undefined widget_id %s", widget_id); + LOGE("undefined widget_id"); return 0; } -- 2.7.4