[ITC][data-control][Non-ACR] Removed unused variables and fixed startup message 79/321179/2
authorTarun Kumar <tarun1.kumar@samsung.com>
Thu, 28 Nov 2024 11:01:59 +0000 (16:31 +0530)
committerTarun Kumar <tarun1.kumar@samsung.com>
Thu, 28 Nov 2024 11:21:25 +0000 (16:51 +0530)
Change-Id: I122d70ae8004dfb0d3d6e6a1e4eca48db8f98df9
Signed-off-by: Tarun Kumar <tarun1.kumar@samsung.com>
src/itc/data-control/ITs-data-control-noti.c
src/itc/data-control/ITs-data-control-sql.c

index 46031bdbeeb72193521e4e54f5d725556e522a5c..28a132c1e3f5c42d2084a439bdeaa6e75a885b8c 100755 (executable)
@@ -34,13 +34,13 @@ static int pCallbackId;
 static void DataControlDataChangeCB(data_control_h provider, data_control_data_change_type_e type,     bundle *data,   void *user_data)
 {
        FPRINTF("[%s:%d] DataControlDataChangeCB hit\\n", __FUNCTION__, __LINE__);
-       
+
        g_bAddCallbackResult = true;
        if ( g_pDataControlMainLoop )
        {
                g_main_loop_quit(g_pDataControlMainLoop);
        }
-       normal_exit(0); 
+       normal_exit(0);
 }
 
 static void InsertResponseCB(int request_id, data_control_h provider, long long inserted_row_id, bool provider_result, const char *error, void *user_data)
@@ -58,18 +58,18 @@ static void AddDataChangedCallbackResultCB( data_control_h provider, data_contro
        g_bDataChangeCallbackHit = true;
        int req_id;
        FPRINTF("[%s:%d] AddDataChangedCallbackResultCB hit\\n", __FUNCTION__, __LINE__);
-       
+
        bundle *b = bundle_create();
        bundle_add_str(b, "WORD", "'test'");
        bundle_add_str(b, "WORD_DESC", "'test desc'");
 
        data_control_sql_insert(g_DataControlProvider, b, &req_id);
-       bundle_free(b); 
-       
+       bundle_free(b);
+
        if ( g_pDataControlMainLoop )
        {
                g_main_loop_quit(g_pDataControlMainLoop);
-       }       
+       }
 }
 
 /**
@@ -94,8 +94,8 @@ void ITs_data_control_noti_startup(void)
        TCT_CheckInstalledApp(1, TEST_DATACONTROLNOT_APPID);
        g_bDataControlCreation = false;
        if ( DataControlNotiSqlHandle(&g_DataControlProvider) == true )
-       {               
-               g_bDataControlCreation = true;  
+       {
+               g_bDataControlCreation = true;
        }
 }
 
@@ -113,7 +113,7 @@ void ITs_data_control_noti_cleanup(void)
 
        if ( g_bDataControlCreation == true )
        {
-               data_control_sql_destroy(g_DataControlProvider);                
+               data_control_sql_destroy(g_DataControlProvider);
        }
 }
 
@@ -139,13 +139,12 @@ int ITs_data_control_add_remove_data_change_cb_p(void)
        int result;
        data_control_sql_response_cb sql_callback;
        sql_callback.insert_cb = InsertResponseCB;
-       int nTimeoutId = 0 ;    
        g_bAddCallbackResult = false;
        g_bDataChangeCallbackHit = false;
-       
+
        result = data_control_sql_register_response_cb(g_DataControlProvider, &sql_callback, NULL);
        PRINT_RESULT(DATA_CONTROL_ERROR_NONE, result, "data_control_sql_register_response_cb", DataControlGetError(result));
-       
+
        //Target API
        result = data_control_add_data_change_cb(g_DataControlProvider,
                                DataControlDataChangeCB,
@@ -156,29 +155,29 @@ int ITs_data_control_add_remove_data_change_cb_p(void)
 
        g_bCallbackHit = false;
 
-       RUN_POLLING_LOOP;       
-                       
+       RUN_POLLING_LOOP;
+
        if ( g_bDataChangeCallbackHit == false )
        {
                FPRINTF("[Line : %d][%s] callback AddDataChangedCallbackResultCB not invoked\\n", __LINE__, API_NAMESPACE);
                data_control_remove_data_change_cb(g_DataControlProvider, pCallbackId);
                return 1;
        }
-       
-       nTimeoutId = 0 ;
+
+
        RUN_POLLING_LOOP;
-       
+
        if ( g_bAddCallbackResult == false )
-       {       
+       {
                FPRINTF("[Line : %d][%s] callback DataControlDataChangeCB not invoked\\n", __LINE__, API_NAMESPACE);
                data_control_remove_data_change_cb(g_DataControlProvider, pCallbackId);
                return 1;
-       }       
-       
+       }
+
        //Target API
        result = data_control_remove_data_change_cb(g_DataControlProvider, pCallbackId);
        PRINT_RESULT(DATA_CONTROL_ERROR_NONE, result, "data_control_remove_data_change_cb", DataControlGetError(result));
-               
+
        return 0;
 }
 
@@ -207,7 +206,7 @@ int ITc_data_control_sql_register_response_cb_p(void)
 
        int result = data_control_sql_register_response_cb(g_DataControlProvider, &sql_callback, NULL);
        PRINT_RESULT(DATA_CONTROL_ERROR_NONE, result, "data_control_sql_register_response_cb", DataControlGetError(result));
-       
+
        return 0;
 }
 /**
@@ -229,8 +228,7 @@ int ITc_data_control_sql_register_response_cb_p(void)
 int ITc_data_control_provider_send_data_change_noti_p(void)
 {
        START_TEST;
-       
-       int nTimeoutId = 0;
+
 
        bundle *pBundleData = bundle_create();
        if ( pBundleData == NULL )
@@ -238,12 +236,12 @@ int ITc_data_control_provider_send_data_change_noti_p(void)
                FPRINTF("[Line : %d][%s] bundle_create failed\\n", __LINE__, API_NAMESPACE);
                return 1;
        }
-       
+
        int result = data_control_provider_send_data_change_noti(g_DataControlProvider, DATA_CONTROL_DATA_CHANGE_SQL_INSERT, pBundleData);
        PRINT_RESULT_CLEANUP(DATA_CONTROL_ERROR_NONE, result, "data_control_provider_send_data_change_noti", DataControlGetError(result),bundle_free(pBundleData));
-       
+
        bundle_free(pBundleData);
-       
+
        return 0;
 }
 
index 74e0ffb2363d102d76340f7b23ab2834fe349933..a6831f076e7177867e71396e74ab5a9283211bea 100755 (executable)
@@ -775,7 +775,7 @@ void ITs_data_control_sql_startup(void)
        }
 
 #if DEBUG
-       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Data_Control_p\\n", __LINE__, API_NAMESPACE);
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_data_control_sql_startup\\n", __LINE__, API_NAMESPACE);
 #endif
 
        TCT_CheckInstalledApp(1, TEST_DATACONTROL_APPID);
@@ -801,7 +801,7 @@ void ITs_data_control_sql_cleanup(void)
        }
 
 #if DEBUG
-       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Data_Control_p\\n", __LINE__, API_NAMESPACE);
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_data_control_sql_cleanup\\n", __LINE__, API_NAMESPACE);
 #endif
 }
 
@@ -953,7 +953,6 @@ int ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p(void
        START_TEST;
 
        int nRequestId = 0;
-       int nTimeoutId = 0;
 
        bundle *pstData = bundle_create();
        if ( pstData == NULL )
@@ -978,7 +977,7 @@ int ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p(void
        g_bCallbackHit = false;
        g_bIsInsertDataCheck = true;
        memset(g_szWordDesc, 0, sizeof(g_szWordDesc));
-       
+
        nRet = data_control_sql_insert(g_stSqlProvider, pstData, &nRequestId);
        PRINT_RESULT_CLEANUP(DATA_CONTROL_ERROR_NONE, nRet, "data_control_sql_insert", DataControlGetError(nRet), data_control_sql_unregister_response_cb(g_stSqlProvider);bundle_free(pstData));
 
@@ -1042,7 +1041,6 @@ int ITc_data_control_sql_data_control_sql_insert_delete_p(void)
        START_TEST;
 
        int nRequestId = 0;
-       int nTimeoutId = 0;
 
        data_control_sql_response_cb stSqlCallBack = {0};
        stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
@@ -1133,7 +1131,6 @@ int ITc_data_control_sql_data_control_sql_update_select_p(void)
        START_TEST;
 
        int nRequestId = 0;
-       int nTimeoutId = 0;
 
        data_control_sql_response_cb stSqlCallBack = {0};
        stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
@@ -1261,7 +1258,6 @@ int ITc_data_control_sql_data_control_sql_select_with_page_p(void)
        START_TEST;
 
        int nRequestId = 0;
-       int nTimeoutId = 0;
 
        data_control_sql_response_cb stSqlCallBack = {0};
        stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;