utest: Fix warning of incorrect type casting 04/161404/2
authorAndrii Sokolenko <a.sokolenko@samsung.com>
Thu, 23 Nov 2017 07:46:54 +0000 (09:46 +0200)
committerBoram Park <boram1288.park@samsung.com>
Fri, 24 Nov 2017 01:15:00 +0000 (01:15 +0000)
Change-Id: I8f8654f2f1e170ae539e417649b7c5b3dc035786
Signed-off-by: Andrii Sokolenko <a.sokolenko@samsung.com>
utests/src/ut_tdm_buffer.cpp
utests/src/ut_tdm_output.cpp

index 7efba7b..c7b8029 100644 (file)
@@ -14,7 +14,7 @@ extern "C" {
 class TDMBuffer: public ::testing::Test
 {
 protected:
-       static tbm_bufmgr tbm_bufmgr;
+       static tbm_bufmgr tbm_bufmgr_s;
        static int master_fd;
 
        tbm_surface_h surface;
@@ -42,15 +42,15 @@ protected:
        static void SetUpTestCase()
        {
                SetEnv();
-               tbm_bufmgr = tbm_bufmgr_init(-1);
-               ASSERT_FALSE(tbm_bufmgr == NULL);
+               tbm_bufmgr_s = tbm_bufmgr_init(-1);
+               ASSERT_FALSE(tbm_bufmgr_s == NULL);
                master_fd = tbm_drm_helper_get_master_fd();
        }
 
        static void TearDownTestCase()
        {
-               tbm_bufmgr_deinit(tbm_bufmgr);
-               tbm_bufmgr = NULL;
+               tbm_bufmgr_deinit(tbm_bufmgr_s);
+               tbm_bufmgr_s = NULL;
 
                if (master_fd > -1) {
                        int temp_master_fd = tbm_drm_helper_get_master_fd();
@@ -76,7 +76,7 @@ protected:
        }
 };
 
-tbm_bufmgr TDMBuffer::tbm_bufmgr = NULL;
+tbm_bufmgr TDMBuffer::tbm_bufmgr_s = NULL;
 int TDMBuffer::master_fd = -42;
 
 
index 9c050ba..effb32f 100644 (file)
@@ -109,7 +109,7 @@ class TDMOutputCommit : public TDMOutput {
 protected:
        int conn_output_count = 0;
        tdm_output ** connected_output_array = NULL;
-       tdm_output_mode** preferred_mode = NULL;
+       const tdm_output_mode** preferred_mode = NULL;
        bool has_output = false;
        void SetUp(void)
        {
@@ -117,7 +117,7 @@ protected:
                if (TDMOutput::output_count > 0) {
                        connected_output_array = (tdm_output **) calloc(TDMOutput::output_count, sizeof(tdm_output *));
                        ASSERT_FALSE(NULL == connected_output_array);
-                       preferred_mode = (tdm_output_mode **) calloc(TDMOutput::output_count, sizeof(tdm_output_mode*));
+                       preferred_mode = (const tdm_output_mode **) calloc(TDMOutput::output_count, sizeof(tdm_output_mode*));
                        ASSERT_FALSE(NULL == preferred_mode);
                }
                conn_output_count = 0;