Fix unused value 98/297298/1 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20231005.092532 accepted/tizen/unified/20230818.054609 accepted/tizen/unified/dev/20240620.003344 tizen_8.0_m2_release
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 16 Aug 2023 12:03:23 +0000 (21:03 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Wed, 16 Aug 2023 12:03:28 +0000 (21:03 +0900)
Change-Id: Ib5494c29c38ff6137f342b351589a678a0a634cd

src/tdm_exynos_pp.c

index bd6caf1c600e7371c5a32aeb57997d5aeef37312..8dee042a9cfbcc29751855ae90828d643820ae9a 100644 (file)
@@ -462,7 +462,7 @@ _tdm_exynos_pp_destroy_task(tdm_exynos_pp_data *pp_data, tdm_exynos_pp_task * ta
 static int
 _tdm_exynos_pp_make_new_tasks(tdm_exynos_pp_data *pp_data)
 {
-       tdm_exynos_pp_buffer *main_buffer = NULL, *b = NULL, *bb = NULL;
+       tdm_exynos_pp_buffer *b = NULL, *bb = NULL;
        tdm_exynos_pp_task *new_task = NULL;
        int i;
        if (LIST_IS_EMPTY(&pp_data->pending_buffer_list)) {
@@ -470,7 +470,6 @@ _tdm_exynos_pp_make_new_tasks(tdm_exynos_pp_data *pp_data)
                return 0;
        }
        LIST_FOR_EACH_ENTRY_SAFE(b, bb, &pp_data->pending_buffer_list, link) {
-               main_buffer = b;
                if ((new_task = calloc(1, sizeof(tdm_exynos_pp_task))) == NULL) {
                        TDM_BACKEND_ERR("Out of memory");
                        return -1;
@@ -482,17 +481,17 @@ _tdm_exynos_pp_make_new_tasks(tdm_exynos_pp_data *pp_data)
                new_task->current_step = 0;
                new_task->done_func = pp_data->done_func;
                new_task->done_user_data = pp_data->done_user_data;
-               tbm_surface_internal_ref(main_buffer->src);
-               new_task->buffers[0].src = main_buffer->src;
-               tbm_surface_internal_ref(main_buffer->dst);
-               new_task->buffers[new_task->max_step-1].dst = main_buffer->dst;
+               tbm_surface_internal_ref(b->src);
+               new_task->buffers[0].src = b->src;
+               tbm_surface_internal_ref(b->dst);
+               new_task->buffers[new_task->max_step-1].dst = b->dst;
 
 #if 0
                if (new_task->max_step > 1) {
                        tbm_surface_info_s src_buf_info;
                        tbm_surface_info_s dst_buf_info;
-                       tbm_surface_get_info(main_buffer->src, &src_buf_info);
-                       tbm_surface_get_info(main_buffer->dst, &dst_buf_info);
+                       tbm_surface_get_info(b->src, &src_buf_info);
+                       tbm_surface_get_info(b->dst, &dst_buf_info);
                        unsigned int max_width = (src_buf_info.width > dst_buf_info.width) ? src_buf_info.width : dst_buf_info.width;
                        unsigned int max_height = (src_buf_info.height > dst_buf_info.height) ? src_buf_info.height : dst_buf_info.height;
                        tbm_format temp_buf_fmt = dst_buf_info.format;
@@ -511,10 +510,9 @@ _tdm_exynos_pp_make_new_tasks(tdm_exynos_pp_data *pp_data)
                        new_task->buffers[i].src = new_task->buffers[i-1].dst;
                        }
                LIST_ADDTAIL(&new_task->link, &pp_data->pending_tasks_list);
-               TDM_BACKEND_DBG("pp %p(%d). Add new src %p dst %p buffer", pp_data, pp_data->stamp, main_buffer->src, main_buffer->dst);
+               TDM_BACKEND_DBG("pp %p(%d). Add new src %p dst %p buffer", pp_data, pp_data->stamp, b->src, b->dst);
                TDM_BACKEND_DBG("To New task %p(%d)", new_task, new_task->stamp);
-               free(main_buffer);
-               main_buffer = NULL;
+               free(b);
        }
        return 1;
 }