gralloc: Fix narrowing Conversion
hardware/samsung_slsi-cm/exynos7580/gralloc/framebuffer.cpp:141:25: error: non-constant-expression cannot be narrowed from type 'int' to '__u32' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] cfg[0].src = {0, 0, mod->xres, mod->yres, mod->xres, mod->yres}; ^~~~~~~~~ hardware/samsung_slsi-cm/exynos7580/gralloc/framebuffer.cpp:141:25: note: insert an explicit cast to silence this issue cfg[0].src = {0, 0, mod->xres, mod->yres, mod->xres, mod->yres}; ^~~~~~~~~ static_cast<__u32>( ) hardware/samsung_slsi-cm/exynos7580/gralloc/framebuffer.cpp:141:36: error: non-constant-expression cannot be narrowed from type 'int' to '__u32' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] cfg[0].src = {0, 0, mod->xres, mod->yres, mod->xres, mod->yres}; ^~~~~~~~~ hardware/samsung_slsi-cm/exynos7580/gralloc/framebuffer.cpp:141:36: note: insert an explicit cast to silence this issue cfg[0].src = {0, 0, mod->xres, mod->yres, mod->xres, mod->yres}; ^~~~~~~~~ static_cast<__u32>( ) hardware/samsung_slsi-cm/exynos7580/gralloc/framebuffer.cpp:141:47: error: non-constant-expression cannot be narrowed from type 'int' to '__u32' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] cfg[0].src = {0, 0, mod->xres, mod->yres, mod->xres, mod->yres}; ^~~~~~~~~ hardware/samsung_slsi-cm/exynos7580/gralloc/framebuffer.cpp:141:47: note: insert an explicit cast to silence this issue cfg[0].src = {0, 0, mod->xres, mod->yres, mod->xres, mod->yres}; ^~~~~~~~~ static_cast<__u32>( ) hardware/samsung_slsi-cm/exynos7580/gralloc/framebuffer.cpp:141:58: error: non-constant-expression cannot be narrowed from type 'int' to '__u32' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] cfg[0].src = {0, 0, mod->xres, mod->yres, mod->xres, mod->yres}; ^~~~~~~~~ hardware/samsung_slsi-cm/exynos7580/gralloc/framebuffer.cpp:141:58: note: insert an explicit cast to silence this issue cfg[0].src = {0, 0, mod->xres, mod->yres, mod->xres, mod->yres}; ^~~~~~~~~ static_cast<__u32>( ) Change-Id: I9da85a77c89e3589b70a5ab6b45e771a844936c2
Loading
Please register or sign in to comment