[glom] Avoid uninitialized variables in CanvasGroupGrid
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Avoid uninitialized variables in CanvasGroupGrid
- Date: Tue, 5 Oct 2010 11:28:12 +0000 (UTC)
commit cd5554f63f5fd89e1f474d6f28e15b992ab78886
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 4038c73..fcdb2bf 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 Murray Cumming <murrayc murrayc com>
Choices Layout: Fields List: Slight improvement.
diff --git a/glom/utility_widgets/canvas/canvas_group_grid.cc b/glom/utility_widgets/canvas/canvas_group_grid.cc
index a5ba5eb..d87f46e 100644
--- a/glom/utility_widgets/canvas/canvas_group_grid.cc
+++ b/glom/utility_widgets/canvas/canvas_group_grid.cc
@@ -215,7 +215,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]