wip
This commit is contained in:
parent
96f5780f06
commit
daacda9484
@ -327,7 +327,7 @@ if (ENABLE_SANITIZER)
|
||||
endif()
|
||||
|
||||
# Configuring compilers
|
||||
set(OSRM_WARNING_FLAGS "-Werror=all -Werror=extra -Werror=uninitialized -Werror=unreachable-code -Werror=unused-variable -Werror=unreachable-code -Wno-error=cpp -Wpedantic")
|
||||
set(OSRM_WARNING_FLAGS "-Wno-used-but-marked-unused -Wno-cast-function-type -Wno-non-virtual-dtor -Wno-undefined-reinterpret-cast -Wno-suggest-destructor-override -Wno-inconsistent-missing-destructor-override -Wno-undefined-func-template -Wno-unused-member-function -Wno-covered-switch-default -Wno-documentation -Wno-unused-template -Wno-global-constructors -Wno-exit-time-destructors -Wno-double-promotion -Wno-float-conversion -Wno-weak-template-vtables -Wno-weak-vtables -Wno-undef -Wno-float-equal -Wimplicit-float-conversion -Wno-shadow -Wno-switch-enum -Wno-shorten-64-to-32 -Wno-extra-semi -Wno-atomic-implicit-seq-cst -Wno-sign-conversion -Wno-suggest-override -Wno-implicit-int-conversion -Wno-missing-prototypes -Wno-missing-noreturn -Wno-disabled-macro-expansion -Wno-padded -Wno-shadow-field -Wno-newline-eof -Wno-old-style-cast -Wno-zero-as-null-pointer-constant -Wno-shadow-field-in-constructor -Wno-c++98-compat -Wno-c++98-compat-pedantic -Werror -Wunused -Werror=all -Werror=extra -Werror=uninitialized -Werror=unreachable-code -Werror=unused-variable -Werror=unreachable-code -Wno-error=cpp -Wpedantic")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OSRM_WARNING_FLAGS} -Werror=strict-overflow=2 -Wno-error=unused-local-typedef -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -fcolor-diagnostics -ftemplate-depth=1024 -Wno-unused-command-line-argument")
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
|
||||
@ -56,7 +56,7 @@ inline auto contractExcludableGraph(ContractorGraph contractor_graph_,
|
||||
// By not contracting all contractable nodes we avoid creating
|
||||
// a very dense core. This increases the overall graph sizes a little bit
|
||||
// but increases the final CH quality and contraction speed.
|
||||
constexpr float BASE_CORE = 0.9;
|
||||
constexpr float BASE_CORE = 0.9f;
|
||||
is_shared_core =
|
||||
contractGraph(contractor_graph, std::move(always_allowed), node_weights, BASE_CORE);
|
||||
|
||||
|
||||
@ -124,8 +124,8 @@ class BaseAPI
|
||||
const auto &snapped_location = candidatesSnappedLocation(candidates);
|
||||
const auto &input_location = candidatesInputLocation(candidates);
|
||||
auto location =
|
||||
fbresult::Position(static_cast<double>(util::toFloating(snapped_location.lon)),
|
||||
static_cast<double>(util::toFloating(snapped_location.lat)));
|
||||
fbresult::Position(static_cast<float>(static_cast<double>(util::toFloating(snapped_location.lon))),
|
||||
static_cast<float>(static_cast<double>(util::toFloating(snapped_location.lat))));
|
||||
|
||||
const auto toName = [this](const auto &phantom) {
|
||||
return facade.GetNameForID(facade.GetNameIndex(phantom.forward_segment_id.id))
|
||||
@ -157,7 +157,7 @@ class BaseAPI
|
||||
auto waypoint = std::make_unique<fbresult::WaypointBuilder>(*builder);
|
||||
waypoint->add_location(&location);
|
||||
waypoint->add_distance(
|
||||
util::coordinate_calculation::greatCircleDistance(snapped_location, input_location));
|
||||
static_cast<float>(util::coordinate_calculation::greatCircleDistance(snapped_location, input_location)));
|
||||
waypoint->add_name(name_string);
|
||||
if (parameters.generate_hints)
|
||||
{
|
||||
|
||||
@ -75,7 +75,7 @@ template <typename Data> struct SharedMonitor
|
||||
|
||||
region = bi::mapped_region(shmem, bi::read_write);
|
||||
}
|
||||
catch (const bi::interprocess_exception &exception)
|
||||
catch (const bi::interprocess_exception &)
|
||||
{
|
||||
auto message = boost::format("No shared memory block '%1%' found, have you forgotten "
|
||||
"to run osrm-datastore?") %
|
||||
@ -124,7 +124,7 @@ template <typename Data> struct SharedMonitor
|
||||
bi::shared_memory_object shmem_open =
|
||||
bi::shared_memory_object(bi::open_only, Data::name, bi::read_only);
|
||||
}
|
||||
catch (const bi::interprocess_exception &exception)
|
||||
catch (const bi::interprocess_exception &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -63,8 +63,6 @@ template <typename NodeID, typename Key> class ArrayStorage
|
||||
public:
|
||||
explicit ArrayStorage(std::size_t size) : positions(size, 0) {}
|
||||
|
||||
~ArrayStorage() {}
|
||||
|
||||
Key &operator[](NodeID node) { return positions[node]; }
|
||||
|
||||
Key peek_index(const NodeID node) const { return positions[node]; }
|
||||
|
||||
@ -118,7 +118,7 @@ static const EdgeDuration MAXIMAL_EDGE_DURATION = std::numeric_limits<EdgeDurati
|
||||
static const EdgeDistance MAXIMAL_EDGE_DISTANCE = std::numeric_limits<EdgeDistance>::max();
|
||||
static const TurnPenalty INVALID_TURN_PENALTY = std::numeric_limits<TurnPenalty>::max();
|
||||
static const EdgeDistance INVALID_EDGE_DISTANCE = std::numeric_limits<EdgeDistance>::max();
|
||||
static const EdgeDistance INVALID_FALLBACK_SPEED = std::numeric_limits<double>::max();
|
||||
static const EdgeDistance INVALID_FALLBACK_SPEED = std::numeric_limits<EdgeDistance>::max();
|
||||
|
||||
using DatasourceID = std::uint8_t;
|
||||
|
||||
|
||||
@ -196,6 +196,7 @@ std::vector<CompressedNodeBasedGraphEdge> toEdgeList(const util::NodeBasedDynami
|
||||
*/
|
||||
int Extractor::run(ScriptingEnvironment &scripting_environment)
|
||||
{
|
||||
std::string str;
|
||||
util::LogPolicy::GetInstance().Unmute();
|
||||
|
||||
const unsigned recommended_num_threads = std::thread::hardware_concurrency();
|
||||
|
||||
@ -249,7 +249,6 @@ catch (const osrm::RuntimeError &e)
|
||||
{
|
||||
util::DumpMemoryStats();
|
||||
util::Log(logERROR) << e.what();
|
||||
return EXIT_FAILURE;
|
||||
return e.GetCode();
|
||||
}
|
||||
catch (const std::bad_alloc &e)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user