diff --git a/pluginlib/include/pluginlib/class_loader_imp.hpp b/pluginlib/include/pluginlib/class_loader_imp.hpp index 43bfcfb..ca6876a 100644 --- a/pluginlib/include/pluginlib/class_loader_imp.hpp +++ b/pluginlib/include/pluginlib/class_loader_imp.hpp @@ -525,7 +525,6 @@ ClassLoader::getPackageFromPluginXMLFilePath(const std::string & plugin_xml_f // 1. Find nearest encasing package.xml // 2. Extract name of package from package.xml - std::string package_name; std::filesystem::path p(plugin_xml_file_path); std::filesystem::path parent = p.parent_path(); @@ -546,8 +545,6 @@ ClassLoader::getPackageFromPluginXMLFilePath(const std::string & plugin_xml_f return ""; } } - - return package_name; } template @@ -633,14 +630,12 @@ void ClassLoader::processSingleXMLPluginFile( throw pluginlib::InvalidXMLException( "XML Document '" + xml_file + "' has no Root Element. This likely means the XML is malformed or missing."); - return; } const char * config_value = config->Value(); if (NULL == config_value) { throw pluginlib::InvalidXMLException( "XML Document '" + xml_file + "' has an invalid Root Element. This likely means the XML is malformed or missing."); - return; } if (!(strcmp(config_value, "library") == 0 || strcmp(config_value, "class_libraries") == 0)) @@ -648,7 +643,6 @@ void ClassLoader::processSingleXMLPluginFile( throw pluginlib::InvalidXMLException( "The XML document '" + xml_file + "' given to add must have either \"library\" or " "\"class_libraries\" as the root tag"); - return; } // Step into the filter list if necessary if (strcmp(config_value, "class_libraries") == 0) { @@ -772,7 +766,6 @@ template std::string ClassLoader::stripAllButFileFromPath(const std::string & path) /***************************************************************************/ { - std::string only_file; size_t c = path.find_last_of(getPathSeparator()); if (std::string::npos == c) { return path;