Bug 22000

Summary: "intel_mipmap_tree.c", line 457: warning: pointer to void or function used in arithmetic
Product: Mesa Reporter: Edward O'Callaghan <eocallaghan>
Component: Drivers/DRI/i915Assignee: Ian Romanick <idr>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:

Description Edward O'Callaghan 2009-05-30 02:38:12 UTC
mesa/drivers/dri/intel/intel_mipmap_tree.c

"intel_mipmap_tree.c", line 457: warning: pointer to void or function used in arithmetic

proposed patch:

$ diff -u XW_NV/open-src/lib/mesa/build_32/Mesa-7.4.1/src/mesa/drivers/dri/intel/intel_mipmap_tree.c intel_mipmap_tree.c 
--- XW_NV/open-src/lib/mesa/build_32/Mesa-7.4.1/src/mesa/drivers/dri/intel/intel_mipmap_tree.c  Tue Mar 17 14:48:46 2009
+++ intel_mipmap_tree.c Sat May 30 10:20:16 2009
@@ -454,7 +454,7 @@
                        0, 0,                             /* source x, y */
                        dst->level[level].width, height); /* width, height */
 
-      src += src_image_pitch * dst->cpp;
+      src = (void *) src + src_image_pitch * dst->cpp;
    }
 }

Regards,
Comment 1 Eric Anholt 2009-06-30 22:59:34 UTC
commit 5e6b593d35156a0068dc0eb3e55dec086f1cadd3
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Jun 30 22:57:56 2009 -0700

    intel: Avoid pointer arithmetic on void *.
    
    Bug #22000.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.