Mesa (master): gallium/dri: Shut up a compiler warning.

Eric Anholt anholt at kemper.freedesktop.org
Wed Feb 18 23:48:11 UTC 2015


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Feb 11 14:40:47 2015 -0800

gallium/dri: Shut up a compiler warning.

The compiler doesn't see that buffers is set in the !image case and used
in the !image case.

Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/gallium/state_trackers/dri/dri2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index aecc8eb..7d65ba3 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -368,7 +368,7 @@ dri2_allocate_textures(struct dri_context *ctx,
    /* Image specific variables */
    struct __DRIimageList images;
    /* Dri2 specific variables */
-   __DRIbuffer *buffers;
+   __DRIbuffer *buffers = NULL;
    struct winsys_handle whandle;
    unsigned num_buffers = statts_count;
 




More information about the mesa-commit mailing list