[PATCH] platform: explicitly cast the return value of weston_platform_get_egl_proc_address
Bryce Harrington
bryce at osg.samsung.com
Wed Mar 9 07:24:21 UTC 2016
On Fri, Feb 19, 2016 at 07:12:31PM -0800, Bryce Harrington wrote:
> On Fri, Jan 29, 2016 at 05:02:15PM +0100, Matthias Treydte wrote:
> > This allows the header to be consumed by C++ compilers, because C++ does
> > away with C's implicit cast from (void*).
> > ---
> > shared/platform.h | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
>
> Tabbing looks off maybe but otherwise just adding a cast seems fine.
>
> Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
Pushed:
To ssh://git.freedesktop.org/git/wayland/weston
38298ec..cd9424e master -> master
Bryce
> > diff --git a/shared/platform.h b/shared/platform.h
> > index cf4ecc0..dd55008 100644
> > --- a/shared/platform.h
> > +++ b/shared/platform.h
> > @@ -75,8 +75,9 @@ weston_platform_get_egl_display(EGLenum platform, void *native_display,
> > static PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display = NULL;
> >
> > if (!get_platform_display) {
> > - get_platform_display = weston_platform_get_egl_proc_address(
> > - "eglGetPlatformDisplayEXT");
> > + get_platform_display = (PFNEGLGETPLATFORMDISPLAYEXTPROC)
> > + weston_platform_get_egl_proc_address(
> > + "eglGetPlatformDisplayEXT");
> > }
> >
> > if (get_platform_display)
> > @@ -95,8 +96,9 @@ weston_platform_create_egl_surface(EGLDisplay dpy, EGLConfig config,
> > create_platform_window = NULL;
> >
> > if (!create_platform_window) {
> > - create_platform_window = weston_platform_get_egl_proc_address(
> > - "eglCreatePlatformWindowSurfaceEXT");
> > + create_platform_window = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)
> > + weston_platform_get_egl_proc_address(
> > + "eglCreatePlatformWindowSurfaceEXT");
> > }
> >
> > if (create_platform_window)
> > --
> > 2.7.0
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list