[cogl/wip/hadess/automake-1.16] Initialize variables
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/hadess/automake-1.16] Initialize variables
- Date: Thu, 4 Jun 2020 11:21:20 +0000 (UTC)
commit c4b3bccc94822e5535050586fe626c7b7854d720
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jun 4 12:16:59 2020 +0100
Initialize variables
They can end up in paths that use them without valid values, or at least
the compiler warns about that.
cogl/cogl-atlas.c | 2 +-
cogl/cogl-blend-string.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl-atlas.c b/cogl/cogl-atlas.c
index 57405dad..b8f50aef 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;
diff --git a/cogl/cogl-blend-string.c b/cogl/cogl-blend-string.c
index 8791d731..34ac72da 100644
--- a/cogl/cogl-blend-string.c
+++ b/cogl/cogl-blend-string.c
@@ -473,7 +473,7 @@ parse_argument (const char *string, /* original user string */
const char *error_string = NULL;
ParserArgState state = PARSER_ARG_STATE_START;
CoglBool parsing_factor = FALSE;
- CoglBool implicit_factor_brace;
+ CoglBool implicit_factor_brace = FALSE;
arg->source.is_zero = FALSE;
arg->source.info = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]