Commit: 12261aa047f41eb7f0d29c3ba25d933c3f67e7fc
Author: Mike Erwin
Date:   Fri Apr 21 15:51:08 2017 -0400
Branches: blender2.8
https://developer.blender.org/rB12261aa047f41eb7f0d29c3ba25d933c3f67e7fc

fix unitizialized use warning

The code would only use 'type' uninitialized in error conditions, but it's 
still better to avoid that.

caught by clang

===================================================================

M       source/blender/draw/intern/draw_manager.c

===================================================================

diff --git a/source/blender/draw/intern/draw_manager.c 
b/source/blender/draw/intern/draw_manager.c
index 1f0bf0cf79c..66e44edc63d 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1319,6 +1319,7 @@ void DRW_framebuffer_read_data(int x, int y, int w, int 
h, int channels, int slo
                case 4: type = GL_RGBA; break;
                default:
                        BLI_assert(false && "wrong number of read channels");
+                       return;
        }
        glReadBuffer(GL_COLOR_ATTACHMENT0 + slot);
        glReadPixels(x, y, w, h, type, GL_FLOAT, data);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to