summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorRobert Foss <[email protected]>2017-03-01 19:14:39 -0500
committerEmil Velikov <[email protected]>2017-03-15 18:54:31 +0000
commite13a41d91e75df7a5527a60b4c3c8ee2976dad14 (patch)
tree8601df4fe0cc10ea4c7d6d04530a9fc9cb543fb6 /src/mesa
parentcb4798d731f07207771de7cf0ac9f55eec94a809 (diff)
mesa: Avoid read of uninitialized variable
The is_color_attachement variable is later read when handling two separate error cases, where only one of the cases results in the variable being initialized. This can be avoided by giving the variable a safe default value. Coverity-Id: 1398631 Cc: [email protected] Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 88becf73022d780cfd0d7dbc5bb3911f8b0d2b11)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/fbobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 044bd635794..8148dac90cc 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3628,7 +3628,7 @@ _mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx,
GLint *params, const char *caller)
{
const struct gl_renderbuffer_attachment *att;
- bool is_color_attachment;
+ bool is_color_attachment = false;
GLenum err;
/* The error code for an attachment type of GL_NONE differs between APIs.