Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7273613e authored by Apavayan Sinha's avatar Apavayan Sinha
Browse files

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
parent 4f79c779
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment