aboutsummaryrefslogtreecommitdiff
path: root/paludis/tar_merger.cc
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2013-02-26 20:22:30 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2013-03-02 09:24:47 -0800
commit16b3eee5ba0a51edbcb08b06240fa3a8ba494031 (patch)
tree84ca5d0ae74956a2cb265df700c6d7cbd413d835 /paludis/tar_merger.cc
parentb784a32a074800cf0b68bf4ab334909e1a04a0e4 (diff)
downloadpaludis-16b3eee5ba0a51edbcb08b06240fa3a8ba494031.tar.gz
paludis-16b3eee5ba0a51edbcb08b06240fa3a8ba494031.tar.xz
cleanup not-reached warnings
Use the preprocessor more aggresively to avoid a not-reached warning, and mark functions as non-return if necessary.
Diffstat (limited to 'paludis/tar_merger.cc')
-rw-r--r--paludis/tar_merger.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/paludis/tar_merger.cc b/paludis/tar_merger.cc
index d48775395..bb508fcbe 100644
--- a/paludis/tar_merger.cc
+++ b/paludis/tar_merger.cc
@@ -57,11 +57,13 @@ namespace
CleanupPtr cleanup;
TarMergerHandle()
+#ifndef ENABLE_PBINS
+ PALUDIS_ATTRIBUTE((noreturn))
+#endif
{
#ifndef ENABLE_PBINS
throw NotAvailableError("Paludis was built without support for pbins");
-#endif
-
+#else
handle = ::dlopen(("libpaludistarextras_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
if (! handle)
throw MergerError("Unable to open libpaludistarextras due to error '" + stringify(::dlerror()) + "' from dlopen");
@@ -81,6 +83,7 @@ namespace
cleanup = STUPID_CAST(CleanupPtr, ::dlsym(handle, "paludis_tar_extras_cleanup"));
if (! cleanup)
throw MergerError("Unable to cleanup from libpaludistarextras due to error '" + stringify(::dlerror()) + "' from dlsym");
+#endif
}
~TarMergerHandle()