From 8ff8c82630ccef75c13c84b5b32b45dda976f4ec Mon Sep 17 00:00:00 2001 From: Greg V Date: Sun, 31 Dec 2017 19:55:27 +0300 Subject: [PATCH] swr: fix clang 5 null cast warning Reviewed-by: Emil Velikov Reviewed-by: Bruce Cherniak --- src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h b/src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h index 6c801c7ff69..abb0c53ec41 100644 --- a/src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h +++ b/src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h @@ -624,7 +624,7 @@ uint32_t TileSwizzle2D(uint32_t xOffsetBytes, uint32_t yOffsetRows, const SWR_SU case SWR_TILE_MODE_WMAJOR: return ComputeTileSwizzle2D >(xOffsetBytes, yOffsetRows, pState); default: SWR_INVALID("Unsupported tiling mode"); } - return (uint32_t) NULL; + return 0; } ////////////////////////////////////////////////////////////////////////// @@ -644,7 +644,7 @@ uint32_t TileSwizzle3D(uint32_t xOffsetBytes, uint32_t yOffsetRows, uint32_t zOf case SWR_TILE_MODE_YMAJOR: return ComputeTileSwizzle3D >(xOffsetBytes, yOffsetRows, zOffsetSlices, pState); default: SWR_INVALID("Unsupported tiling mode"); } - return (uint32_t) NULL; + return 0; } template @@ -677,7 +677,7 @@ uint32_t ComputeSurfaceOffset(uint32_t x, uint32_t y, uint32_t z, uint32_t array default: SWR_INVALID("Unsupported format"); } - return (uint32_t) NULL; + return 0; } typedef void*(*PFN_COMPUTESURFADDR)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, const SWR_SURFACE_STATE*); -- 2.30.2