Bug 650834 - Add casts to pointer differences in assertion r=dougt
authorTimothy B. Terriberry <tterribe@vt.edu>
Mon, 18 Apr 2011 12:22:51 -0700
changeset 68694 deee3852caafda96c264d6be29fe5c2fc8564951
parent 68693 d93dea97b533f4a5d8eb4dc15297c7a1767cf724
child 68695 de5a3db2d9c027dc478fe267b9fdec15e1a8a026
push id11
push userffxbld
push dateThu, 11 Aug 2011 21:43:38 +0000
treeherdermozilla-release@cf0a29826586 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs650834
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 650834 - Add casts to pointer differences in assertion r=dougt
gfx/ycbcr/ycbcr_to_rgb565.cpp
--- a/gfx/ycbcr/ycbcr_to_rgb565.cpp
+++ b/gfx/ycbcr/ycbcr_to_rgb565.cpp
@@ -372,17 +372,18 @@ NS_GFX_(void) ScaleYCbCrToRGB565(const P
     "ScaleYCbCrToRGB565 source image unpadded?");
   /*The NEON code requires the pointers to be aligned to a 16-byte boundary at
      the start of each row.
     This should be true for all of our sources.
     We could try to fix this up if it's not true by adjusting source_x0, but
      that would require the mis-alignment to be the same for the U and V
      planes.*/
   NS_ASSERTION((y_pitch&15) == 0 && (uv_pitch&15) == 0 &&
-   ((y_buf-NULL)&15) == 0 && ((u_buf-NULL)&15) == 0 && ((v_buf-NULL)&15) == 0,
+   ((y_buf-(PRUint8 *)NULL)&15) == 0 &&
+   ((u_buf-(PRUint8 *)NULL)&15) == 0 && ((v_buf-(PRUint8 *)NULL)&15) == 0,
    "ScaleYCbCrToRGB565 source image unaligned");
   /*We take an area-based approach to pixel coverage to avoid shifting by small
      amounts (or not so small, when up-scaling or down-scaling by a large
      factor).
 
     An illustrative example: scaling 4:2:0 up by 2, using JPEG chroma cositing^.
 
     + = RGB destination locations