utest: Fix warning of incorrect 64bits type casting 89/161589/3
authorAndrii Sokolenko <a.sokolenko@samsung.com>
Fri, 24 Nov 2017 08:45:59 +0000 (10:45 +0200)
committerSooChan Lim <sc1.lim@samsung.com>
Sun, 26 Nov 2017 03:42:04 +0000 (03:42 +0000)
Change-Id: Ic0ab8db296a8295425da1ffc44d1bced023daea1
Signed-off-by: Andrii Sokolenko <a.sokolenko@samsung.com>
utests/src/ut_tdm_output.cpp

index effb32f..be7d0b3 100644 (file)
@@ -49,7 +49,7 @@ protected:
                                                                                                        tdm_value value,
                                                                                                        void *u_data)
        {
-               if ( ((int) u_data) < -100) {
+               if ( ((intptr_t) u_data) < -100) {
                        TDMOutput::handle_call++;
                }
        }
@@ -375,7 +375,7 @@ TEST_F(TDMOutput, OutputAddChangeHandlerSuccessfulFewFuncs)
                if (status == TDM_OUTPUT_CONN_STATUS_DISCONNECTED)
                        continue;
                checked = true;
-               for (int k = 0; k < 20; k++) {
+               for (intptr_t k = 0; k < 20; k++) {
                        ASSERT_TRUE(TDM_ERROR_NONE == tdm_output_add_change_handler(output,
                                                                                                                                                tdm_output_change_handler_test_func,
                                                                                                                                                (void *) (-101-k)));
@@ -463,7 +463,7 @@ TEST_F(TDMOutput, OutputRemoveChangeHandlerSuccessfulFewFuncs)
                if (status == TDM_OUTPUT_CONN_STATUS_DISCONNECTED)
                        continue;
                checked = true;
-               for (int k = 0; k < 20; k++) {
+               for (intptr_t k = 0; k < 20; k++) {
                        ASSERT_TRUE(TDM_ERROR_NONE == tdm_output_add_change_handler(output,
                                                                                                                                                tdm_output_change_handler_test_func,
                                                                                                                                                (void *) (-101-k)));
@@ -472,7 +472,7 @@ TEST_F(TDMOutput, OutputRemoveChangeHandlerSuccessfulFewFuncs)
                ASSERT_TRUE(TDM_ERROR_NONE == tdm_output_set_dpms(output, TDM_OUTPUT_DPMS_OFF));
                ASSERT_GT(handle_call, 20);
                handle_call = 0;
-               for (int k = 0; k < 20; k++) {
+               for (intptr_t k = 0; k < 20; k++) {
                        tdm_output_remove_change_handler(output, tdm_output_change_handler_test_func, (void *) (-101-k));
                }
                ASSERT_TRUE(TDM_ERROR_NONE == tdm_output_set_dpms(output, TDM_OUTPUT_DPMS_ON));