[CFI] Remove function pointer cast of row_decode_worker_hook
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>
Thu, 18 Apr 2019 17:45:36 +0000 (10:45 -0700)
committerHarish Mahendrakar <harish.mahendrakar@ittiam.com>
Fri, 19 Apr 2019 15:43:20 +0000 (15:43 +0000)
This fixes CFI error flagged for this function when row-mt=1

Change-Id: Ic5b427a6b621228280ebe829d00b540b18e2c087

vp9/decoder/vp9_decodeframe.c

index c75c3d9..ccfb813 100644 (file)
@@ -1839,8 +1839,9 @@ static void parse_tile_row(TileWorkerData *tile_data, VP9Decoder *pbi,
   }
 }
 
-static int row_decode_worker_hook(ThreadData *const thread_data,
-                                  uint8_t **data_end) {
+static int row_decode_worker_hook(void *arg1, void *arg2) {
+  ThreadData *const thread_data = (ThreadData *)arg1;
+  uint8_t **data_end = (uint8_t **)arg2;
   VP9Decoder *const pbi = thread_data->pbi;
   VP9_COMMON *const cm = &pbi->common;
   RowMTWorkerData *const row_mt_worker_data = pbi->row_mt_worker_data;
@@ -2303,7 +2304,7 @@ static const uint8_t *decode_tiles_row_wise_mt(VP9Decoder *pbi,
 
     thread_data->pbi = pbi;
 
-    worker->hook = (VPxWorkerHook)row_decode_worker_hook;
+    worker->hook = row_decode_worker_hook;
     worker->data1 = thread_data;
     worker->data2 = (void *)&row_mt_worker_data->data_end;
   }