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)`.
This commit is contained in:
parent
a80d4dcdea
commit
be4e3f21e4
@ -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();
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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)
|
||||
|
@ -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 &);
|
||||
|
||||
|
@ -28,7 +28,9 @@ using namespace paludis;
|
||||
|
||||
#include <paludis/output_manager-se.cc>
|
||||
|
||||
OutputManager::~OutputManager() = default;
|
||||
OutputManager::~OutputManager() noexcept(false)
|
||||
{
|
||||
}
|
||||
|
||||
namespace paludis
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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) + "'.");
|
||||
|
@ -149,7 +149,7 @@ namespace paludis
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~FSCreateCon();
|
||||
~FSCreateCon() noexcept(false);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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())
|
||||
{
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user