]> granicus.if.org Git - graphviz/commit
pathplan Pshortestpath: use longs instead of ints for index variables
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Aug 2022 19:40:55 +0000 (12:40 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Aug 2022 19:40:55 +0000 (12:40 -0700)
commitb9843fa7394a9e4c529c5d537c0fdd530ee20278
treee8045a9faa41cba9c49a792460a91212ce88ee0b
parent15f1b2f12e612ba77da981035f2f0aa95b477b1a
pathplan Pshortestpath: use longs instead of ints for index variables

Within this function, these indices are sometimes calculated using pointer
arithmetic which has a long (technically `ptrdiff_t`) result. Using a long type
for these variables squashes 2 -Wconversion warnings and reduces the change of
arithmetic overflows.
lib/pathplan/shortest.c