[glom/glom-1-14] Avoid uninitialized variables in CanvasGroupGrid
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-14] Avoid uninitialized variables in CanvasGroupGrid
- Date: Tue, 5 Oct 2010 11:25:59 +0000 (UTC)
commit dbbbe56430c204378fcc77bf8da49e08b4339dd1
Author: David King <davidk openismus com>
Date: Tue Oct 5 13:25:00 2010 +0200
Avoid uninitialized variables in CanvasGroupGrid
* glom/utility_widgets/canvas/canvas_group_grid.cc: Initialize
variables at declaration.
ChangeLog | 7 +++++++
glom/utility_widgets/canvas/canvas_group_grid.cc | 5 ++++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f26bf99..61af7d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-05 David King <davidk openismus com>
+
+ Avoid uninitialized variables in CanvasGroupGrid
+
+ * glom/utility_widgets/canvas/canvas_group_grid.cc: Initialize
+ variables at declaration.
+
2010-10-04 Jon Nordby <jonn openismus com>
Set programming language explicitly around --enable-warnings macros
diff --git a/glom/utility_widgets/canvas/canvas_group_grid.cc b/glom/utility_widgets/canvas/canvas_group_grid.cc
index 09052e5..3f1d21d 100644
--- a/glom/utility_widgets/canvas/canvas_group_grid.cc
+++ b/glom/utility_widgets/canvas/canvas_group_grid.cc
@@ -226,7 +226,10 @@ void CanvasGroupGrid::create_lines()
m_grid_rules_group->remove_child(0);
//Fill the parent canvas with lines:
- double left, top, right, bottom = 0.0;
+ double left = 0.0;
+ double top = 0.0;
+ double right = 0.0;
+ double bottom = 0.0;
Goocanvas::Canvas* canvas = get_canvas();
if(canvas)
canvas->get_bounds(left, top, right, bottom);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]