Fix build warning based on GCC-9 85/221285/1
authorhyunho <hhstark.kang@samsung.com>
Tue, 31 Dec 2019 01:47:54 +0000 (10:47 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 31 Dec 2019 01:47:54 +0000 (10:47 +0900)
Change-Id: I9f4c22f4186108ac37738d25d633d2fd88565610
Signed-off-by: hyunho <hhstark.kang@samsung.com>
src/widget_instance.c

index bea1c71..19cf3cd 100644 (file)
@@ -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;
        }