sony / flutter-embedded-linux

Embedded Linux embedding for Flutter
BSD 3-Clause "New" or "Revised" License
1.16k stars 122 forks source link

egl_stream: add cast to EGLAttrib #400

Closed makotosato-at closed 7 months ago

makotosato-at commented 7 months ago

Hello.

I'm trying to build for armhf. In the process, I met the following errors.

context_egl_stream.cc:31:26: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'EGLAttrib' (aka 'int') in initializer list [-Wc++11-narrowing]
      EGL_DRM_PLANE_EXT, static_cast<NativeWindowDrmEglstream*>(window)->PlaneId(),
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
context_egl_stream.cc:31:26: note: insert an explicit cast to silence this issue
      EGL_DRM_PLANE_EXT, static_cast<NativeWindowDrmEglstream*>(window)->PlaneId(),
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                         static_cast<EGLAttrib>(                                  )
1 error generated.

So I added a cast.