Fix #7339. shortest_path
inconsisitent with warning
#7341
Merged
shortest_path
inconsisitent with warning
#7341