[Mesa-dev] [PATCH 02/10] egl: un-fallthrough sync attr parsing

Rob Clark robdclark at gmail.com
Fri Nov 18 13:39:31 UTC 2016


Doesn't work so well when you start having more than one possible
attrib.  Prep-work for next patch.

Signed-off-by: Rob Clark <robdclark at gmail.com>
---
 src/egl/main/eglsync.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/egl/main/eglsync.c b/src/egl/main/eglsync.c
index 005cb31..7b2c882 100644
--- a/src/egl/main/eglsync.c
+++ b/src/egl/main/eglsync.c
@@ -55,11 +55,11 @@ _eglParseSyncAttribList(_EGLSync *sync, const EGLAttrib *attrib_list)
       case EGL_CL_EVENT_HANDLE_KHR:
          if (sync->Type == EGL_SYNC_CL_EVENT_KHR) {
             sync->CLEvent = val;
-            break;
+         } else {
+            err = EGL_BAD_ATTRIBUTE;
          }
-         /* fall through */
+         break;
       default:
-         (void) val;
          err = EGL_BAD_ATTRIBUTE;
          break;
       }
-- 
2.7.4



More information about the mesa-dev mailing list