From 9d0b5f82c2734444145718f12788f2dde436ef45 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 1 May 2019 13:03:59 +0100 Subject: COMPMID-2177 Fix clang warnings Change-Id: I78039db8c58d7b14a042c41e54c25fb9cb509bf7 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/1092 Reviewed-by: VidhyaSudhan Loganathan Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/runtime/GLES_COMPUTE/GCScheduler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/runtime/GLES_COMPUTE/GCScheduler.cpp') diff --git a/src/runtime/GLES_COMPUTE/GCScheduler.cpp b/src/runtime/GLES_COMPUTE/GCScheduler.cpp index f7812730fc..6a39e7c360 100644 --- a/src/runtime/GLES_COMPUTE/GCScheduler.cpp +++ b/src/runtime/GLES_COMPUTE/GCScheduler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -97,7 +97,7 @@ void GCScheduler::setup_context() ARM_COMPUTE_ERROR_ON_MSG((strstr(egl_extension_st, "EGL_KHR_surfaceless_context") == nullptr), "Failed to query EGL_KHR_surfaceless_context"); ARM_COMPUTE_UNUSED(egl_extension_st); - const EGLint config_attribs[] = + const std::array config_attribs = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT_KHR, EGL_NONE @@ -105,7 +105,7 @@ void GCScheduler::setup_context() EGLConfig cfg; EGLint count; - res = eglChooseConfig(_display, config_attribs, &cfg, 1, &count); + res = eglChooseConfig(_display, config_attribs.data(), &cfg, 1, &count); ARM_COMPUTE_ERROR_ON_MSG(res == EGL_FALSE, "Failed to choose config: 0x%x.", eglGetError()); ARM_COMPUTE_UNUSED(res); @@ -114,7 +114,7 @@ void GCScheduler::setup_context() ARM_COMPUTE_ERROR_ON_MSG(res == EGL_FALSE, "Failed to bind api: 0x%x.", eglGetError()); - const EGLint attribs[] = + const std::array attribs = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE @@ -122,7 +122,7 @@ void GCScheduler::setup_context() _context = eglCreateContext(_display, cfg, EGL_NO_CONTEXT, - attribs); + attribs.data()); ARM_COMPUTE_ERROR_ON_MSG(_context == EGL_NO_CONTEXT, "Failed to create context: 0x%x.", eglGetError()); ARM_COMPUTE_UNUSED(res); -- cgit v1.2.1