egl: un-fallthrough sync attr parsing
authorRob Clark <robclark@freedesktop.org>
Thu, 1 Dec 2016 18:57:24 +0000 (10:57 -0800)
committerChad Versace <chadversary@chromium.org>
Thu, 1 Dec 2016 18:57:24 +0000 (10:57 -0800)
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@gmail.com>
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Tested-by: Chad Versace <chadversary@chromium.org>
src/egl/main/eglsync.c

index 005cb31fc31bb994fcb59dd544bf206d40ac6c19..7b2c882d813c10c0938f51f46aeb1fb0608d2345 100644 (file)
@@ -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;
       }