aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-11 14:28:07 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-11 14:28:07 -0800
commitbe4e3f21e4465fba00571b547050d0b8c0350589 (patch)
treebcd2baf85486541b1254b58d8f6da0900245fe3c /paludis
parenta80d4dcdea8e36471a3f9a9184d1d1416030b51a (diff)
downloadpaludis-be4e3f21e4465fba00571b547050d0b8c0350589.tar.gz
paludis-be4e3f21e4465fba00571b547050d0b8c0350589.tar.xz
paludis: address -Wterminate warning from gcc 6
In C++11, destructors are `noexcept` by default. However, some of the destructors in paludis throw. Annotate these functions as `noexcept(false)`.
Diffstat (limited to 'paludis')
-rw-r--r--paludis/command_output_manager.cc2
-rw-r--r--paludis/command_output_manager.hh2
-rw-r--r--paludis/ipc_output_manager.cc8
-rw-r--r--paludis/ipc_output_manager.hh4
-rw-r--r--paludis/output_manager.cc4
-rw-r--r--paludis/output_manager.hh2
-rw-r--r--paludis/selinux/security_context.cc2
-rw-r--r--paludis/selinux/security_context.hh2
-rw-r--r--paludis/serialise.cc2
-rw-r--r--paludis/serialise.hh2
10 files changed, 17 insertions, 13 deletions
diff --git a/paludis/command_output_manager.cc b/paludis/command_output_manager.cc
index 9fcf040..95a5370 100644
--- a/paludis/command_output_manager.cc
+++ b/paludis/command_output_manager.cc
@@ -114,7 +114,7 @@ CommandOutputManager::CommandOutputManager(const std::string & s, const std::str
_imp->stderr_stream.reset(new SafeOFStream(_imp->stderr_pipe->write_fd(), false));
}
-CommandOutputManager::~CommandOutputManager()
+CommandOutputManager::~CommandOutputManager() noexcept(false)
{
nothing_more_to_come();
diff --git a/paludis/command_output_manager.hh b/paludis/command_output_manager.hh
index 3e2c9a9..27699c2 100644
--- a/paludis/command_output_manager.hh
+++ b/paludis/command_output_manager.hh
@@ -53,7 +53,7 @@ namespace paludis
const std::string & succeeded_command,
const std::string & nothing_more_to_come_command
);
- ~CommandOutputManager();
+ ~CommandOutputManager() noexcept(false);
virtual std::ostream & stdout_stream() PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::ostream & stderr_stream() PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/ipc_output_manager.cc b/paludis/ipc_output_manager.cc
index c6070ba..5ed2f92 100644
--- a/paludis/ipc_output_manager.cc
+++ b/paludis/ipc_output_manager.cc
@@ -125,7 +125,7 @@ IPCOutputManager::IPCOutputManager(const int r, const int w, const CreateOutputM
<< "Constructed";
}
-IPCOutputManager::~IPCOutputManager()
+IPCOutputManager::~IPCOutputManager() noexcept(false)
{
*_imp->pipe_command_write_stream << "FINISHED 1" << '\0' << std::flush;
@@ -245,7 +245,7 @@ IPCInputManager::IPCInputManager(const Environment * const e,
{
}
-IPCInputManager::~IPCInputManager()
+IPCInputManager::~IPCInputManager() noexcept(false)
{
char c('x');
if (1 != write(_imp->finished_pipe.write_fd(), &c, 1))
@@ -491,7 +491,9 @@ OutputManagerFromIPC::OutputManagerFromIPC(const Environment * const e,
{
}
-OutputManagerFromIPC::~OutputManagerFromIPC() = default;
+OutputManagerFromIPC::~OutputManagerFromIPC() noexcept(false)
+{
+}
const std::shared_ptr<OutputManager>
OutputManagerFromIPC::operator() (const Action & a)
diff --git a/paludis/ipc_output_manager.hh b/paludis/ipc_output_manager.hh
index 33b2506..111f6d5 100644
--- a/paludis/ipc_output_manager.hh
+++ b/paludis/ipc_output_manager.hh
@@ -71,7 +71,7 @@ namespace paludis
const Environment * const,
const std::function<void (const std::shared_ptr<OutputManager> &)> &);
- ~IPCInputManager();
+ ~IPCInputManager() noexcept(false);
const std::function<std::string (const std::string &)> pipe_command_handler()
PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -104,7 +104,7 @@ namespace paludis
const ClientOutputFeatures &
);
- ~OutputManagerFromIPC();
+ ~OutputManagerFromIPC() noexcept(false);
const std::shared_ptr<OutputManager> operator() (const Action &);
diff --git a/paludis/output_manager.cc b/paludis/output_manager.cc
index 0db94ef..40f3918 100644
--- a/paludis/output_manager.cc
+++ b/paludis/output_manager.cc
@@ -28,7 +28,9 @@ using namespace paludis;
#include <paludis/output_manager-se.cc>
-OutputManager::~OutputManager() = default;
+OutputManager::~OutputManager() noexcept(false)
+{
+}
namespace paludis
{
diff --git a/paludis/output_manager.hh b/paludis/output_manager.hh
index ce06d49..e0e9e7e 100644
--- a/paludis/output_manager.hh
+++ b/paludis/output_manager.hh
@@ -30,7 +30,7 @@ namespace paludis
{
public:
OutputManager() = default;
- virtual ~OutputManager() = 0;
+ virtual ~OutputManager() noexcept(false) = 0;
OutputManager(const OutputManager &) = delete;
OutputManager & operator= (const OutputManager &) = delete;
diff --git a/paludis/selinux/security_context.cc b/paludis/selinux/security_context.cc
index ab1378a..d569cbf 100644
--- a/paludis/selinux/security_context.cc
+++ b/paludis/selinux/security_context.cc
@@ -209,7 +209,7 @@ FSCreateCon::FSCreateCon(const std::shared_ptr<const SecurityContext> & newfscre
throw SELinuxException("Couldn't set filesystem creation context to '" + stringify(*_context) + "'.");
}
-FSCreateCon::~FSCreateCon()
+FSCreateCon::~FSCreateCon() noexcept(false)
{
if (0 != libselinux.setfscreatecon(_prev_context->_imp->_context))
throw SELinuxException("Couldn't reset filesystem creation context to '" + stringify(*_prev_context) + "'.");
diff --git a/paludis/selinux/security_context.hh b/paludis/selinux/security_context.hh
index acf9a0b..41b97ef 100644
--- a/paludis/selinux/security_context.hh
+++ b/paludis/selinux/security_context.hh
@@ -149,7 +149,7 @@ namespace paludis
/**
* Destructor
*/
- ~FSCreateCon();
+ ~FSCreateCon() noexcept(false);
};
/**
diff --git a/paludis/serialise.cc b/paludis/serialise.cc
index 24663b2..e7577ad 100644
--- a/paludis/serialise.cc
+++ b/paludis/serialise.cc
@@ -332,7 +332,7 @@ Deserialisator::Deserialisator(Deserialisation & d, const std::string & c) :
_imp->keys.insert(std::make_pair((*i)->item_name(), *i));
}
-Deserialisator::~Deserialisator()
+Deserialisator::~Deserialisator() noexcept(false)
{
if (! std::uncaught_exception())
{
diff --git a/paludis/serialise.hh b/paludis/serialise.hh
index aac0228..0210a60 100644
--- a/paludis/serialise.hh
+++ b/paludis/serialise.hh
@@ -136,7 +136,7 @@ namespace paludis
Deserialisation &,
const std::string & class_name);
- ~Deserialisator();
+ ~Deserialisator() noexcept(false);
const Deserialisation & deserialisation() const PALUDIS_ATTRIBUTE((warn_unused_result));