Mesa (master): i965: Fix compiler warning from uninitialized "success" value.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jan 11 12:08:07 PST 2012


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jan 11 12:07:15 2012 -0800

i965: Fix compiler warning from uninitialized "success" value.

This shouldn't happen, because the DDX should only load this driver if
IS_965.  But better to do something defined in that case.

---

 src/mesa/drivers/dri/intel/intel_screen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index ce96ddd..b0e800b 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -525,7 +525,7 @@ intelCreateContext(gl_api api,
 {
    __DRIscreen *sPriv = driContextPriv->driScreenPriv;
    struct intel_screen *intelScreen = sPriv->driverPrivate;
-   bool success;
+   bool success = false;
 
 #ifdef I915
    if (IS_9XX(intelScreen->deviceID)) {



More information about the mesa-commit mailing list