Fix lcov pair error 49/307449/2
authorJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 8 Mar 2024 10:10:27 +0000 (19:10 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Mon, 11 Mar 2024 01:27:55 +0000 (10:27 +0900)
New lcov version do not allow start stop comment pair error.
It makes lcov generating failed.

Change-Id: I42aa883a0f1faca63b08e097df60ed3388691237
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/tdm_hwc_window.c
src/tdm_output.c
src/tdm_server.c

index 074131d..a4f2fb6 100644 (file)
@@ -98,22 +98,18 @@ tdm_hwc_window_create_internal(tdm_private_hwc *private_hwc, tdm_error *error)
 
        if (!private_module->use_hal_tdm) {
                if (!func_hwc->hwc_create_window) {
-                       /* LCOV_EXCL_START */
                        if (error)
                                *error = TDM_ERROR_BAD_MODULE;
                        return NULL;
-                       /* LCOV_EXCL_STOP */
                }
        }
 
        private_hwc_window = calloc(1, sizeof(tdm_private_hwc_window));
        if (!private_hwc_window) {
-               /* LCOV_EXCL_START */
                TDM_ERR("failed: alloc memory");
                if (error)
                        *error = TDM_ERROR_OUT_OF_MEMORY;
                return NULL;
-               /* LCOV_EXCL_STOP */
        }
        if (private_module->use_hal_tdm)
                hwc_window_backend = (tdm_hwc_window *)hal_tdm_hwc_create_window((hal_tdm_hwc *)private_hwc->hwc_backend, (hal_tdm_error *)&ret);
@@ -208,7 +204,6 @@ tdm_hwc_window_acquire_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error
                queue = hal_tdm_hwc_window_acquire_buffer_queue((hal_tdm_hwc_window *)private_hwc_window->hwc_window_backend, (hal_tdm_error *)error);
        } else {
                if (!func_hwc_window->hwc_window_acquire_buffer_queue) {
-                       /* LCOV_EXCL_START */
                        _pthread_mutex_unlock(&private_display->lock);
                        TDM_WRN("not implemented!!");
                        if (error)
@@ -472,7 +467,6 @@ tdm_hwc_window_get_property(tdm_hwc_window *hwc_window, unsigned int id, tdm_val
                        memcpy(&value->ptr, &hvalue.ptr, sizeof(tdm_value));
        } else {
                if (!func_hwc_window->hwc_window_get_property) {
-                       /* LCOV_EXCL_START */
                        _pthread_mutex_unlock(&private_display->lock);
                        TDM_WRN("not implemented!!");
                        return TDM_ERROR_NOT_IMPLEMENTED;
@@ -504,7 +498,6 @@ tdm_hwc_window_set_property(tdm_hwc_window *hwc_window, unsigned int id, tdm_val
                ret = hal_tdm_hwc_window_set_property((hal_tdm_hwc_window *)private_hwc_window->hwc_window_backend, id, hvalue);
        } else {
                if (!func_hwc_window->hwc_window_set_property) {
-                       /* LCOV_EXCL_START */
                        _pthread_mutex_unlock(&private_display->lock);
                        TDM_WRN("not implemented!!");
                        return TDM_ERROR_NOT_IMPLEMENTED;
index 9232de9..d8c3946 100644 (file)
@@ -571,11 +571,9 @@ tdm_output_add_mode_change_request_handler(tdm_output *output,
 
        mode_change_handler = calloc(1, sizeof(tdm_private_output_mode_change_handler));
        if (!mode_change_handler) {
-               /* LCOV_EXCL_START */
                TDM_ERR("failed: alloc memory");
                _pthread_mutex_unlock(&private_display->lock);
                return TDM_ERROR_OUT_OF_MEMORY;
-               /* LCOV_EXCL_STOP */
        }
 
        mode_change_handler->private_output = private_output;
index e13fb83..bdcda8b 100644 (file)
@@ -1258,25 +1258,17 @@ _tdm_server_cb_create_virtual_output(struct wl_client *client, struct wl_resourc
                wl_resource_create(client, &wl_tdm_voutput_interface,
                                                   wl_resource_get_version(resource), id);
        if (!voutput_resource) {
-               /* LCOV_EXCL_START */
-
                wl_resource_post_no_memory(resource);
                TDM_ERR("wl_resource_create failed");
                return;
-
-               /* LCOV_EXCL_STOP */
        }
 
        voutput_info = calloc(1, sizeof * voutput_info);
        if (!voutput_info) {
-               /* LCOV_EXCL_START */
-
                wl_resource_post_no_memory(resource);
                wl_resource_destroy(voutput_resource);
                TDM_ERR("alloc failed");
                return;
-
-               /* LCOV_EXCL_STOP */
        }
 
        LIST_ADDTAIL(&voutput_info->link, &private_server->voutput_list);