[Mesa-dev] [PATCH 2/5] mesa: replace _mesa_problem() with unreachable() in _mesa_light()

Timothy Arceri tarceri at itsqueeze.com
Tue May 9 03:04:47 UTC 2017


All drivers but the old nouveau dri driver return after this anyway.
---
 src/mesa/main/light.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 87a06db..245692a 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -179,22 +179,21 @@ _mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *pa
       light->LinearAttenuation = params[0];
       break;
    case GL_QUADRATIC_ATTENUATION:
       assert(params[0] >= 0.0F);
       if (light->QuadraticAttenuation == params[0])
 	 return;
       FLUSH_VERTICES(ctx, _NEW_LIGHT);
       light->QuadraticAttenuation = params[0];
       break;
    default:
-      _mesa_problem(ctx, "Unexpected pname in _mesa_light()");
-      return;
+      unreachable("Unexpected pname in _mesa_light()");
    }
 
    if (ctx->Driver.Lightfv)
       ctx->Driver.Lightfv( ctx, GL_LIGHT0 + lnum, pname, params );
 }
 
 
 void GLAPIENTRY
 _mesa_Lightf( GLenum light, GLenum pname, GLfloat param )
 {
-- 
2.9.3



More information about the mesa-dev mailing list