[glom] Fix compiler warnings.



commit 72e57f944710c905d0c9869b0cb8bc6932e430e4
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu May 12 22:40:49 2011 +0200

    Fix compiler warnings.
    
    * glom/mode_data/db_adddel/db_adddel.cc:
    * glom/mode_design/layout/dialog_layout_details.cc:
    * glom/report_builder.cc:
    * glom/utility_widgets/eggspreadtable/eggspreadtablednd.c
    (get_index_at_position):
    * tests/test_parsing_time.cc: Remove unused variables noticed by g++ 4.6.

 ChangeLog                                          |   11 +++++++++++
 glom/mode_data/db_adddel/db_adddel.cc              |    4 +---
 glom/mode_design/layout/dialog_layout_details.cc   |    9 ---------
 glom/report_builder.cc                             |    3 ---
 .../eggspreadtable/eggspreadtablednd.c             |    3 +--
 tests/test_parsing_time.cc                         |    2 +-
 6 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fa1d343..650db6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2011-05-12  Murray Cumming  <murrayc murrayc com>
 
+	Fix compiler warnings.
+
+	* glom/mode_data/db_adddel/db_adddel.cc:
+	* glom/mode_design/layout/dialog_layout_details.cc:
+	* glom/report_builder.cc:
+	* glom/utility_widgets/eggspreadtable/eggspreadtablednd.c
+	(get_index_at_position):
+	* tests/test_parsing_time.cc: Remove unused variables noticed by g++ 4.6.
+
+2011-05-12  Murray Cumming  <murrayc murrayc com>
+
 	Require latest libepc.
 
 	Because it uses avahi-ui-gtk3, which uses GTK+3.
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index 89ffcbc..2a41df8 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -1919,9 +1919,7 @@ Gnome::Gda::Value DbAddDel::get_value_key(const Gtk::TreeModel::iterator& iter)
 void DbAddDel::set_value_key(const Gtk::TreeModel::iterator& iter, const Gnome::Gda::Value& value)
 {
   if(iter && m_refListStore)
-  {
-    Gtk::TreeModel::Row row = *iter;
-
+  { 
     if(!(Conversions::value_is_empty(value)))
     {
       //This is not a placeholder anymore, if it every was:
diff --git a/glom/mode_design/layout/dialog_layout_details.cc b/glom/mode_design/layout/dialog_layout_details.cc
index 572eca8..ce93fba 100644
--- a/glom/mode_design/layout/dialog_layout_details.cc
+++ b/glom/mode_design/layout/dialog_layout_details.cc
@@ -715,8 +715,6 @@ void Dialog_Layout_Details::on_button_add_image()
 
 void Dialog_Layout_Details::on_button_add_notebook()
 {
-  Gtk::TreeModel::iterator parent = get_selected_group_parent();
-
   Gtk::TreeModel::iterator iter = append_appropriate_row();
   if(iter)
   {
@@ -741,8 +739,6 @@ void Dialog_Layout_Details::on_button_add_notebook()
 
 void Dialog_Layout_Details::on_button_add_related()
 {
-  Gtk::TreeModel::iterator parent = get_selected_group_parent();
-
   /* We don't need to ask this because the portal layout dialog can now handle an empty portal:
   sharedptr<Relationship> relationship = offer_relationship_list();
   if(relationship)
@@ -775,8 +771,6 @@ void Dialog_Layout_Details::on_button_add_related()
 
 void Dialog_Layout_Details::on_button_add_related_calendar()
 {
-  Gtk::TreeModel::iterator parent = get_selected_group_parent();
-
   /* We don't need to ask this because the portal layout dialog can now handle an empty portal:
   sharedptr<Relationship> relationship = offer_relationship_list();
   if(relationship)
@@ -1287,7 +1281,6 @@ void Dialog_Layout_Details::on_treeview_cell_edited_title(const Glib::ustring& p
       if(layout_item)
       {
         //Store the user's new text in the model:
-        Gtk::TreeRow row = *iter;
         layout_item->set_title(new_text);
 
         m_modified = true;
@@ -1312,7 +1305,6 @@ void Dialog_Layout_Details::on_treeview_cell_edited_name(const Glib::ustring& pa
       if(layout_item)
       {
         //Store the user's new text in the model:
-        Gtk::TreeRow row = *iter;
         layout_item->set_name(new_text);
 
         m_modified = true;
@@ -1340,7 +1332,6 @@ void Dialog_Layout_Details::on_treeview_cell_edited_column_width(const Glib::ust
         const guint new_value = static_cast<guint>( strtod(new_text.c_str(), &pchEnd) );
 
         //Store the user's new value in the model:
-        Gtk::TreeRow row = *iter;
         layout_item->set_display_width(new_value);
 
         m_modified = true;
diff --git a/glom/report_builder.cc b/glom/report_builder.cc
index cfeebbe..d544600 100644
--- a/glom/report_builder.cc
+++ b/glom/report_builder.cc
@@ -321,13 +321,10 @@ void ReportBuilder::report_build_records(const FoundSet& found_set, xmlpp::Eleme
       found_set.m_where_clause, sharedptr<const Relationship>() /* extra_join */, found_set.m_sort_clause,
       limit);
 
-    bool records_found = false;
     Glib::RefPtr<Gnome::Gda::DataModel> datamodel = DbUtils::query_execute_select(sql_query);
     if(datamodel)
     {
       const guint rows_count = datamodel->get_n_rows();
-      if(rows_count > 0)
-        records_found = true;
 
       for(guint row = 0; row < rows_count; ++row)
       {
diff --git a/glom/utility_widgets/eggspreadtable/eggspreadtablednd.c b/glom/utility_widgets/eggspreadtable/eggspreadtablednd.c
index 6fad48e..db70787 100644
--- a/glom/utility_widgets/eggspreadtable/eggspreadtablednd.c
+++ b/glom/utility_widgets/eggspreadtable/eggspreadtablednd.c
@@ -1017,7 +1017,7 @@ get_index_at_position (EggSpreadTableDnd *spread_table,
 		       gint              *line_ret)
 {
   EggSpreadTable *table;
-  GtkWidget      *widget, *child;
+  GtkWidget      *child;
   GList          *children, *l;
   GtkAllocation   allocation;
   gint            placeholder_cnt = 0;
@@ -1025,7 +1025,6 @@ get_index_at_position (EggSpreadTableDnd *spread_table,
   gint           *segments, lines, line = -1, i, full_size, spacing, position, line_width, first_child;
   gint            index = -1;
 
-  widget = GTK_WIDGET (spread_table);
   table  = EGG_SPREAD_TABLE (spread_table);
 
   /* First find the "line" in question */
diff --git a/tests/test_parsing_time.cc b/tests/test_parsing_time.cc
index 74187f1..c239614 100644
--- a/tests/test_parsing_time.cc
+++ b/tests/test_parsing_time.cc
@@ -12,7 +12,7 @@ int main()
 
   //We try parse_time() though parse_value() calls it anyway,
   //to give us a clue if parse_value would fail.
-  struct tm value_as_tm =
+  /* struct tm value_as_tm = */
     Glom::Conversions::parse_time(time_text_input, success);
   if(!success)
   {



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