ltog / osmi-addresses

Calculates the Address view of the OSM Inspector
Boost Software License 1.0
11 stars 4 forks source link

abs() of unsigned int has no effect #38

Closed ltog closed 9 years ago

ltog commented 9 years ago

clang warns of usage of abs() for unsigned int values, e.g. here: https://github.com/ltog/osmi-addresses/blob/5c405897b8a1e289599f80ee60dad49f6f7279da/osmi/InterpolationWriter.hpp#L118

Taking the difference of first and last might result in an underflow which won't be noticed by abs()...