Mesa (master): mesa: replace _mesa_problem() with unreachable() in _mesa_light()

Timothy Arceri tarceri at kemper.freedesktop.org
Tue May 16 02:31:56 UTC 2017


Module: Mesa
Branch: master
Commit: 4c1664ff086fcb9fdb7e463d78252d1fbe5e1d5e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c1664ff086fcb9fdb7e463d78252d1fbe5e1d5e

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Tue May  9 12:36:35 2017 +1000

mesa: replace _mesa_problem() with unreachable() in _mesa_light()

All drivers but the old nouveau dri driver return after this anyway.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

---

 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 87a06db309..245692a54c 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -186,8 +186,7 @@ _mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *pa
       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)




More information about the mesa-commit mailing list