schrodinger / coordgenlibs

Schrodinger-developed 2D Coordinate Generation
BSD 3-Clause "New" or "Revised" License
42 stars 28 forks source link

Reduce compiler warnings #29

Closed ricrogz closed 5 years ago

ricrogz commented 5 years ago

This PR contains changes aimed at reducing the amount of compiler warnings generated at build (actually, all the warnings I saw in linux, mac, VS2017 and appveyor).

This is the second try: with the previous ones, I found that RDKit's coordgen tests were broken, so I closed the previous PR, undid some changes, and opened this one.

Changes have been tested on different system configurations, including Mac, Linux and Windows. In all of these environments, compilation happens successfully, and no warnings are generated during compilation.

I also added and enabled a 'COORDGEN_RIGUROUS_BUILD' macro which enables "/WX" on Windows and "-Wall -Wextra -Werror" on Linux and Mac. On the windows side, the level of warnings reporting is not increased (/W4 or /Wall) because in those cases the compiler starts reporting warnings in boost.

The PR contains a lot of changes, most of them related to type casting, but also some which correct minor bugs (i.e. using a float variable to get an element of a vector, assigning int values to floats and vice versa).

ricrogz commented 5 years ago

I forgot: this PR is based on my other one, which clang-formats the code... it will probably be easier to review this if I repush after the other PR has been merged...