Mesa (master): mesa: Use string literals for format strings

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 3 23:19:25 UTC 2019


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

Author: Mark Janes <mark.a.janes at intel.com>
Date:   Mon Jun  3 15:42:22 2019 -0700

mesa: Use string literals for format strings

Android build settings require format strings to be string literals.

Fixes: d2906293c43 "mesa: EXT_dsa add selectorless matrix stack functions"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110833
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/main/matrix.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index d9898aff628..7d75a900e1b 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -94,7 +94,7 @@ get_named_matrix_stack(struct gl_context *ctx, GLenum mode, const char* caller)
    if (mode >= GL_TEXTURE0 && mode < (GL_TEXTURE0 + ctx->Const.MaxTextureCoordUnits)) {
       return &ctx->TextureMatrixStack[mode - GL_TEXTURE0];
    }
-   _mesa_error(ctx, GL_INVALID_ENUM, caller);
+   _mesa_error(ctx, GL_INVALID_ENUM, "%s", caller);
    return NULL;
 }
 
@@ -111,7 +111,7 @@ static void matrix_frustum(struct gl_matrix_stack* stack,
        nearval == farval ||
        left == right ||
        top == bottom) {
-      _mesa_error(ctx, GL_INVALID_VALUE, caller);
+      _mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
       return;
    }
 
@@ -192,7 +192,7 @@ matrix_ortho(struct gl_matrix_stack* stack,
        bottom == top ||
        nearval == farval)
    {
-      _mesa_error( ctx,  GL_INVALID_VALUE, caller );
+      _mesa_error( ctx,  GL_INVALID_VALUE, "%s", caller );
       return;
    }
 




More information about the mesa-commit mailing list