Open wallisc opened 4 years ago
Hello @wallisc,
The VDB headers are not warning free, this is a known issue. You should be able to easily work around the problem by treating your OpenVDB installation path as a system directory. With GCC/Clang, this is by providing the -isystem
flag to your include directory. With MSVC (from VS2017 v15.6), I believe you can use the "/external:I" switch. Note that the MSVC solution is actually more appropriate for your use case as I think that the sole function of that switch is to disable warnings from external headers (where as -isystem will change the include order in other compilers).
The VDB headers are not warning free, this is a known issue.
Which is really sad considering their Coding Standards General Practices rule #1 is:
Code must compile without any warning messages at the default warning level.
Which is really sad considering their Coding Standards General Practices rule #1 is:
Code must compile without any warning messages at the default warning level.
If it's of any consolation, those were written before VDB was officially supported on Windows (and we skipped various MSVC warnings to accelerate that support) - but yes, we should be warning free on all Platforms we support
Repro steps:
The error I get is "error C4146: unary minus operator applied to unsigned type, result still unsigned" coming from NodeMasks.h lines 112 and 134, code below:
return DeBruijn[Index32((v & -v) * 0x077CB531U) >> 27];
Easy fix would probably be to just cast it to an int and then cast it back to a uint after all is said and done