[glom] Remove some unnecessary returns.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Remove some unnecessary returns.
- Date: Tue, 2 Dec 2014 20:54:49 +0000 (UTC)
commit c63275f9355bc0c7bfbdba77354857c800d07527
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Dec 2 19:41:14 2014 +0100
Remove some unnecessary returns.
Found by Coverity Scan.
glom/dialog_existing_or_new.cc | 4 ----
glom/import_csv/dialog_import_csv_progress.cc | 2 --
glom/libglom/connectionpool_backends/mysql.cc | 1 -
glom/libglom/connectionpool_backends/mysql_self.cc | 1 -
glom/libglom/connectionpool_backends/postgres.cc | 1 -
.../connectionpool_backends/postgres_self.cc | 1 -
glom/libglom/data_structure/field.cc | 2 --
glom/libglom/document/bakery/document.cc | 2 --
8 files changed, 0 insertions(+), 14 deletions(-)
---
diff --git a/glom/dialog_existing_or_new.cc b/glom/dialog_existing_or_new.cc
index cffb86d..d792294 100644
--- a/glom/dialog_existing_or_new.cc
+++ b/glom/dialog_existing_or_new.cc
@@ -408,8 +408,6 @@ Glib::ustring Dialog_ExistingOrNew::get_uri() const
{
throw std::logic_error("Dialog_ExistingOrNew::get_uri: action is neither NEW_FROM_TEMPLATE nor
OPEN_URI");
}
-
- return Glib::ustring();
}
#ifndef G_OS_WIN32
@@ -435,8 +433,6 @@ Glib::ustring Dialog_ExistingOrNew::get_service_name() const
return (*iter)[m_existing_columns.m_col_service_name];
else
throw std::logic_error("Dialog_ExistingOrNew::get_service_name: action is not OPEN_REMOTE");
-
- return Glib::ustring();
}
#endif
diff --git a/glom/import_csv/dialog_import_csv_progress.cc b/glom/import_csv/dialog_import_csv_progress.cc
index 23dc441..969a5fa 100644
--- a/glom/import_csv/dialog_import_csv_progress.cc
+++ b/glom/import_csv/dialog_import_csv_progress.cc
@@ -298,8 +298,6 @@ void Dialog_Import_CSV_Progress::set_primary_key_value(const Gtk::TreeModel::ite
Gnome::Gda::Value Dialog_Import_CSV_Progress::get_primary_key_value(const Gtk::TreeModel::iterator& /* row
*/) const
{
throw std::logic_error("Dialog_Import_CSV_Progress::get_primary_key_value() called");
-
- return Gnome::Gda::Value();
}
} //namespace Glom
diff --git a/glom/libglom/connectionpool_backends/mysql.cc b/glom/libglom/connectionpool_backends/mysql.cc
index d8b4091..5ded092 100644
--- a/glom/libglom/connectionpool_backends/mysql.cc
+++ b/glom/libglom/connectionpool_backends/mysql.cc
@@ -148,7 +148,6 @@ Glib::RefPtr<Gnome::Gda::Connection> MySQL::attempt_connect(const Glib::ustring&
#endif
throw ExceptionConnection(temp_conn ? ExceptionConnection::FAILURE_NO_DATABASE :
ExceptionConnection::FAILURE_NO_SERVER);
- return Glib::RefPtr<Gnome::Gda::Connection>();
}
if(data_model && data_model->get_n_rows() && data_model->get_n_columns())
diff --git a/glom/libglom/connectionpool_backends/mysql_self.cc
b/glom/libglom/connectionpool_backends/mysql_self.cc
index 6f85ecc..c464f8d 100644
--- a/glom/libglom/connectionpool_backends/mysql_self.cc
+++ b/glom/libglom/connectionpool_backends/mysql_self.cc
@@ -595,7 +595,6 @@ Glib::RefPtr<Gnome::Gda::Connection> MySQLSelfHosted::connect(const Glib::ustrin
if(!get_self_hosting_active())
{
throw ExceptionConnection(ExceptionConnection::FAILURE_NO_BACKEND); //TODO: But there is a backend. It's
just not ready.
- return Glib::RefPtr<Gnome::Gda::Connection>();
}
Glib::RefPtr<Gnome::Gda::Connection> result;
diff --git a/glom/libglom/connectionpool_backends/postgres.cc
b/glom/libglom/connectionpool_backends/postgres.cc
index 2630508..2bb8f9f 100644
--- a/glom/libglom/connectionpool_backends/postgres.cc
+++ b/glom/libglom/connectionpool_backends/postgres.cc
@@ -135,7 +135,6 @@ Glib::RefPtr<Gnome::Gda::Connection> Postgres::attempt_connect(const Glib::ustri
#endif
throw ExceptionConnection(temp_conn ? ExceptionConnection::FAILURE_NO_DATABASE :
ExceptionConnection::FAILURE_NO_SERVER);
- return Glib::RefPtr<Gnome::Gda::Connection>();
}
if(data_model && data_model->get_n_rows() && data_model->get_n_columns())
diff --git a/glom/libglom/connectionpool_backends/postgres_self.cc
b/glom/libglom/connectionpool_backends/postgres_self.cc
index c4e773b..bc8d7da 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.cc
+++ b/glom/libglom/connectionpool_backends/postgres_self.cc
@@ -576,7 +576,6 @@ Glib::RefPtr<Gnome::Gda::Connection> PostgresSelfHosted::connect(const Glib::ust
if(!get_self_hosting_active())
{
throw ExceptionConnection(ExceptionConnection::FAILURE_NO_BACKEND); //TODO: But there is a backend. It's
just not ready.
- return Glib::RefPtr<Gnome::Gda::Connection>();
}
Glib::RefPtr<Gnome::Gda::Connection> result;
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index 58003c1..215e48a 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -260,8 +260,6 @@ Glib::ustring Field::sql(const Gnome::Gda::Value& value, const Glib::RefPtr<Gnom
std::cerr << G_STRFUNC << ": The DataHandler was null." << std::endl;
return Glib::ustring();
}
-
- return Glib::ustring();
}
#define GLOM_QUOTE_FOR_FILE_FORMAT "\""
diff --git a/glom/libglom/document/bakery/document.cc b/glom/libglom/document/bakery/document.cc
index 21b9cb3..5fbbec0 100644
--- a/glom/libglom/document/bakery/document.cc
+++ b/glom/libglom/document/bakery/document.cc
@@ -467,8 +467,6 @@ bool Document::get_read_only() const
return read_only;
}
}
-
- return m_bReadOnly;
}
void Document::set_read_only(bool bVal)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]