OSDN Git Service

Use char *ptr instead of void *ptr
authorXiang, Haihao <haihao.xiang@intel.com>
Wed, 21 Sep 2016 04:11:09 +0000 (12:11 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 26 Sep 2016 04:34:33 +0000 (12:34 +0800)
The code performs arithmetic on void *. Although it works in gcc,
it is not legal in C

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/gen75_vpp_vebox.c
src/gen75_vpp_vebox.h

index d88a454..5206615 100644 (file)
@@ -564,7 +564,7 @@ void set_std_table_9(struct intel_vebox_context *proc_ctx, unsigned int *p_table
 
 void hsw_veb_iecp_std_table(VADriverContextP ctx, struct intel_vebox_context *proc_ctx)
 {
-    unsigned int *p_table = proc_ctx->iecp_state_table.ptr + 0 ;
+    unsigned int *p_table = (unsigned int *)proc_ctx->iecp_state_table.ptr;
 
     if(!(proc_ctx->filters_mask & VPP_IECP_STD_STE)){ 
         memset(p_table, 0, 29 * 4);
index 31c5c4e..c693a1e 100644 (file)
@@ -98,7 +98,7 @@ typedef struct veb_frame_store {
 
 typedef struct veb_buffer {
     dri_bo  *bo;
-    void *  ptr;
+    char *  ptr;
     unsigned char  valid;
 } VEBBuffer;