From 2f6970ae970860acaaaa21b2354f6e447faf15bd Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 13 Mar 2013 08:43:04 -0600 Subject: [PATCH] st/osmesa: silence some optimized build warnings --- src/gallium/state_trackers/osmesa/osmesa.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/osmesa/osmesa.c b/src/gallium/state_trackers/osmesa/osmesa.c index 35fa3381d04..fdd0eda1996 100644 --- a/src/gallium/state_trackers/osmesa/osmesa.c +++ b/src/gallium/state_trackers/osmesa/osmesa.c @@ -352,8 +352,8 @@ osmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, templat.flags = 0; for (i = 0; i < count; i++) { - enum pipe_format format; - unsigned bind; + enum pipe_format format = PIPE_FORMAT_NONE; + unsigned bind = 0; /* * At this time, we really only need to handle the front-left color @@ -372,6 +372,10 @@ osmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, format = osbuffer->visual.accum_format; bind = PIPE_BIND_RENDER_TARGET; } + else { + debug_warning("Unexpected attachment type in " + "osmesa_st_framebuffer_validate()"); + } templat.format = format; templat.bind = bind; -- 2.30.2