Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix centos build. References #2415 for pgRouting 3.4.2 #2443

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ string(TIMESTAMP COMPILATION_DATE "%Y/%m/%d" UTC)

set(MINORS 3.4 3.3 3.2 3.1 3.0 2.6)
set(OLD_SIGNATURES
3.4.1
3.4.1
3.4.0
3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 3.3.0
3.2.2 3.2.1 3.2.0
Expand Down Expand Up @@ -315,7 +315,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
endif()

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wconversion -Wmissing-prototypes -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
add_definitions(-Wsign-conversion -Wfloat-conversion)
add_definitions(-Wsign-conversion)
if(BOOST_Geometry_VERSION_OK)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wconversion -pedantic -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
else()
Expand Down
7 changes: 4 additions & 3 deletions src/trsp/trsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ static int compute_trsp(
int64_t v_max_id = 0;
int64_t v_min_id = INT_MAX;

for (size_t z = 0; z < total_tuples; z++) {
size_t z;
for (z = 0; z < total_tuples; z++) {
PGR_DBG("id %ld source %ld target %ld cost %f rev %f",
edges[z].id, edges[z].source, edges[z].target, edges[z].cost, edges[z].reverse_cost);
if (edges[z].source < v_min_id)
Expand All @@ -181,7 +182,7 @@ static int compute_trsp(
/* track if start and end are both in edge tuples */
int s_count = 0;
int t_count = 0;
for (size_t z = 0; z < total_tuples; z++) {
for (z = 0; z < total_tuples; z++) {
// check if edges[] contains source and target
if (dovertex) {
if (edges[z].source == start_id || edges[z].target == start_id)
Expand Down Expand Up @@ -309,7 +310,7 @@ static int compute_trsp(
// ::::::::::::::::::::::::::::::::
// :: restoring original vertex id
// ::::::::::::::::::::::::::::::::
for (size_t z = 0; z < *path_count; z++) {
for (z = 0; z < *path_count; z++) {
if (z || (*path)[z].vertex_id != -1)
(*path)[z].vertex_id += v_min_id;
}
Expand Down