mesa: Fix printf-like warnings.
This commit is contained in:
@@ -6818,7 +6818,7 @@ _mesa_compile_error(GLcontext *ctx, GLenum error, const char *s)
|
|||||||
if (ctx->CompileFlag)
|
if (ctx->CompileFlag)
|
||||||
save_error(ctx, error, s);
|
save_error(ctx, error, s);
|
||||||
if (ctx->ExecuteFlag)
|
if (ctx->ExecuteFlag)
|
||||||
_mesa_error(ctx, error, s);
|
_mesa_error(ctx, error, "%s", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -6885,7 +6885,7 @@ execute_list(GLcontext *ctx, GLuint list)
|
|||||||
else {
|
else {
|
||||||
switch (opcode) {
|
switch (opcode) {
|
||||||
case OPCODE_ERROR:
|
case OPCODE_ERROR:
|
||||||
_mesa_error(ctx, n[1].e, (const char *) n[2].data);
|
_mesa_error(ctx, n[1].e, "%s", (const char *) n[2].data);
|
||||||
break;
|
break;
|
||||||
case OPCODE_ACCUM:
|
case OPCODE_ACCUM:
|
||||||
CALL_Accum(ctx->Exec, (n[1].e, n[2].f));
|
CALL_Accum(ctx->Exec, (n[1].e, n[2].f));
|
||||||
@@ -7917,7 +7917,7 @@ execute_list(GLcontext *ctx, GLuint list)
|
|||||||
char msg[1000];
|
char msg[1000];
|
||||||
_mesa_snprintf(msg, sizeof(msg), "Error in execute_list: opcode=%d",
|
_mesa_snprintf(msg, sizeof(msg), "Error in execute_list: opcode=%d",
|
||||||
(int) opcode);
|
(int) opcode);
|
||||||
_mesa_problem(ctx, msg);
|
_mesa_problem(ctx, "%s", msg);
|
||||||
}
|
}
|
||||||
done = GL_TRUE;
|
done = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -1022,7 +1022,7 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
|
|||||||
|
|
||||||
rb = ctx->CurrentRenderbuffer;
|
rb = ctx->CurrentRenderbuffer;
|
||||||
if (!rb) {
|
if (!rb) {
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION, func);
|
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", func);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -599,7 +599,7 @@ _mesa_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname,
|
|||||||
bitmask |= MAT_BIT_FRONT_INDEXES | MAT_BIT_BACK_INDEXES;
|
bitmask |= MAT_BIT_FRONT_INDEXES | MAT_BIT_BACK_INDEXES;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_mesa_error( ctx, GL_INVALID_ENUM, where );
|
_mesa_error( ctx, GL_INVALID_ENUM, "%s", where );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,12 +610,12 @@ _mesa_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname,
|
|||||||
bitmask &= BACK_MATERIAL_BITS;
|
bitmask &= BACK_MATERIAL_BITS;
|
||||||
}
|
}
|
||||||
else if (face != GL_FRONT_AND_BACK) {
|
else if (face != GL_FRONT_AND_BACK) {
|
||||||
_mesa_error( ctx, GL_INVALID_ENUM, where );
|
_mesa_error( ctx, GL_INVALID_ENUM, "%s", where );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bitmask & ~legal) {
|
if (bitmask & ~legal) {
|
||||||
_mesa_error( ctx, GL_INVALID_ENUM, where );
|
_mesa_error( ctx, GL_INVALID_ENUM, "%s", where );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -156,18 +156,18 @@ struct gl_shader *
|
|||||||
_mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller)
|
_mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller)
|
||||||
{
|
{
|
||||||
if (!name) {
|
if (!name) {
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE, caller);
|
_mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct gl_shader *sh = (struct gl_shader *)
|
struct gl_shader *sh = (struct gl_shader *)
|
||||||
_mesa_HashLookup(ctx->Shared->ShaderObjects, name);
|
_mesa_HashLookup(ctx->Shared->ShaderObjects, name);
|
||||||
if (!sh) {
|
if (!sh) {
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE, caller);
|
_mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (sh->Type == GL_SHADER_PROGRAM_MESA) {
|
if (sh->Type == GL_SHADER_PROGRAM_MESA) {
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION, caller);
|
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return sh;
|
return sh;
|
||||||
@@ -377,18 +377,18 @@ _mesa_lookup_shader_program_err(GLcontext *ctx, GLuint name,
|
|||||||
const char *caller)
|
const char *caller)
|
||||||
{
|
{
|
||||||
if (!name) {
|
if (!name) {
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE, caller);
|
_mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct gl_shader_program *shProg = (struct gl_shader_program *)
|
struct gl_shader_program *shProg = (struct gl_shader_program *)
|
||||||
_mesa_HashLookup(ctx->Shared->ShaderObjects, name);
|
_mesa_HashLookup(ctx->Shared->ShaderObjects, name);
|
||||||
if (!shProg) {
|
if (!shProg) {
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE, caller);
|
_mesa_error(ctx, GL_INVALID_VALUE, "%s", caller);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (shProg->Type != GL_SHADER_PROGRAM_MESA) {
|
if (shProg->Type != GL_SHADER_PROGRAM_MESA) {
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION, caller);
|
_mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return shProg;
|
return shProg;
|
||||||
|
@@ -907,7 +907,7 @@ static struct ureg get_zero( struct texenv_fragment_program *p )
|
|||||||
|
|
||||||
static void program_error( struct texenv_fragment_program *p, const char *msg )
|
static void program_error( struct texenv_fragment_program *p, const char *msg )
|
||||||
{
|
{
|
||||||
_mesa_problem(NULL, msg);
|
_mesa_problem(NULL, "%s", msg);
|
||||||
p->error = 1;
|
p->error = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1405,7 +1405,7 @@ texture_error_check( GLcontext *ctx, GLenum target,
|
|||||||
char message[100];
|
char message[100];
|
||||||
_mesa_snprintf(message, sizeof(message),
|
_mesa_snprintf(message, sizeof(message),
|
||||||
"glTexImage%dD(format/type YCBCR mismatch", dimensions);
|
"glTexImage%dD(format/type YCBCR mismatch", dimensions);
|
||||||
_mesa_error(ctx, GL_INVALID_ENUM, message);
|
_mesa_error(ctx, GL_INVALID_ENUM, "%s", message);
|
||||||
return GL_TRUE; /* error */
|
return GL_TRUE; /* error */
|
||||||
}
|
}
|
||||||
if (target != GL_TEXTURE_2D &&
|
if (target != GL_TEXTURE_2D &&
|
||||||
@@ -1422,7 +1422,7 @@ texture_error_check( GLcontext *ctx, GLenum target,
|
|||||||
_mesa_snprintf(message, sizeof(message),
|
_mesa_snprintf(message, sizeof(message),
|
||||||
"glTexImage%dD(format=GL_YCBCR_MESA and border=%d)",
|
"glTexImage%dD(format=GL_YCBCR_MESA and border=%d)",
|
||||||
dimensions, border);
|
dimensions, border);
|
||||||
_mesa_error(ctx, GL_INVALID_VALUE, message);
|
_mesa_error(ctx, GL_INVALID_VALUE, "%s", message);
|
||||||
}
|
}
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user