From b29f23f7e7c791e7d8786de93d630a12e4250c71 Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Wed, 9 Nov 2016 13:17:01 -0800 Subject: Use static_cast to cast pointers returned by malloc/calloc/realloc/mmap. static_cast is preferable to reinterpret_cast when casting from void* pointers returned by malloc/calloc/realloc/mmap calls. Discovered while looking at compiler warnings (b/26936282). Test: WITH_TIDY=1 WITH_STATIC_ANALYZER=1 mma Change-Id: Iaffd537784aa857108f6981fdfd82d0496eb5592 Merged-In: I151642d5a60c94f312d0611576ad0143c249ba3d --- minui/graphics_fbdev.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'minui/graphics_fbdev.cpp') diff --git a/minui/graphics_fbdev.cpp b/minui/graphics_fbdev.cpp index 0788f7552..631ef4e13 100644 --- a/minui/graphics_fbdev.cpp +++ b/minui/graphics_fbdev.cpp @@ -133,7 +133,7 @@ static GRSurface* fbdev_init(minui_backend* backend) { gr_framebuffer[0].height = vi.yres; gr_framebuffer[0].row_bytes = fi.line_length; gr_framebuffer[0].pixel_bytes = vi.bits_per_pixel / 8; - gr_framebuffer[0].data = reinterpret_cast(bits); + gr_framebuffer[0].data = static_cast(bits); memset(gr_framebuffer[0].data, 0, gr_framebuffer[0].height * gr_framebuffer[0].row_bytes); /* check if we can use double buffering */ -- cgit v1.2.3