aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/accum.c2
-rw-r--r--src/mesa/main/attrib.c6
-rw-r--r--src/mesa/main/fbobject.c8
3 files changed, 6 insertions, 10 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index d81e1ba583c..c0a3e7ea72a 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -426,7 +426,7 @@ accum(struct gl_context *ctx, GLenum op, GLfloat value)
accum_return(ctx, value, xpos, ypos, width, height);
break;
default:
- _mesa_problem(ctx, "invalid mode in _mesa_Accum()");
+ unreachable("invalid mode in _mesa_Accum()");
break;
}
}
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index dbcfb4edc7b..9e86faee346 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1428,8 +1428,7 @@ _mesa_PopAttrib(void)
break;
default:
- _mesa_problem( ctx, "Bad attrib flag in PopAttrib");
- break;
+ unreachable("Bad attrib flag in PopAttrib");
}
next = attr->next;
@@ -1753,8 +1752,7 @@ _mesa_PopClientAttrib(void)
break;
}
default:
- _mesa_problem( ctx, "Bad attrib flag in PopClientAttrib");
- break;
+ unreachable("Bad attrib flag in PopClientAttrib");
}
next = node->next;
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index ef4fecff2ae..a1c5a6f26eb 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3966,10 +3966,6 @@ get_framebuffer_attachment_parameter(struct gl_context *ctx,
&& !_mesa_is_gles3(ctx)) {
goto invalid_pname_enum;
}
- else if (att->Type == GL_NONE) {
- _mesa_error(ctx, err, "%s(invalid pname %s)", caller,
- _mesa_enum_to_string(pname));
- }
else if (att->Texture) {
const struct gl_texture_image *texImage =
_mesa_select_tex_image(att->Texture, att->Texture->Target,
@@ -3987,7 +3983,9 @@ get_framebuffer_attachment_parameter(struct gl_context *ctx,
att->Renderbuffer->Format);
}
else {
- _mesa_problem(ctx, "%s: invalid FBO attachment structure", caller);
+ assert(att->Type == GL_NONE);
+ _mesa_error(ctx, err, "%s(invalid pname %s)", caller,
+ _mesa_enum_to_string(pname));
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_LAYERED: