[cogl/cogl-1.20] Fix compiler warnings



commit 838355afbdf4de9bd3d463b29f3a3e89d85fed2c
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Jun 10 15:13:45 2015 +0100

    Fix compiler warnings
    
    Initialize variables; GCC does not always catch all cases where the
    variables are used after being initialized, especially when it comes to
    out parameters.

 cogl/cogl-atlas.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl-atlas.c b/cogl/cogl-atlas.c
index b7e5679..0fd8b72 100644
--- a/cogl/cogl-atlas.c
+++ b/cogl/cogl-atlas.c
@@ -373,7 +373,7 @@ _cogl_atlas_reserve_space (CoglAtlas             *atlas,
   CoglAtlasGetRectanglesData data;
   CoglRectangleMap *new_map;
   CoglTexture2D *new_tex;
-  unsigned int map_width, map_height;
+  unsigned int map_width = 0, map_height = 0;
   CoglBool ret;
   CoglRectangleMapEntry new_position;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]