Mesa (master): mesa: silence 'variable may be used uninitialized' warning in bufferobj.c

Brian Paul brianp at kemper.freedesktop.org
Tue Oct 3 20:39:07 UTC 2017


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Oct  3 13:54:31 2017 -0600

mesa: silence 'variable may be used uninitialized' warning in bufferobj.c

Found with MinGW optimized build.

Reviewed-by: Charmaine Lee <charmainel at vmware.com>

---

 src/mesa/main/bufferobj.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 2da2128081..0b98483104 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -3287,6 +3287,7 @@ get_map_buffer_access_flags(struct gl_context *ctx, GLenum access,
       *flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
       return _mesa_is_desktop_gl(ctx);
    default:
+      *flags = 0;
       return false;
    }
 }




More information about the mesa-commit mailing list