-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compiler warnings on windows #250
Fix compiler warnings on windows #250
Conversation
|
7410acb
to
a5a32b0
Compare
Ready for review. I should be able to get the CLA stuff sorted out next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great clean up, thanks for taking it on. Question online about static_cast versus constructor.
@fpsunflower I added you to the OpenEXR approved list of contributors under Epic's CCLA. Sorry for the delay! |
a5a32b0
to
22bc38b
Compare
Thanks! Do I need to be added for the Imath repo separately? It looks like its still failing the automated check ... |
Nevermind @xlietz - the CLA seems to be working now! Thanks! |
Signed-off-by: Chris Kulla <ckulla@gmail.com>
22bc38b
to
25983fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay in getting this merged, it all looks good to me.
PR AcademySoftwareFoundation#250 changed the %lx to %llx to suppress an MSVC warning, but it introduced a gcc warning, where uint64_t is long, not long long. Better to leave it as %lx and just cast to long. It's only a printf anyway. Signed-off-by: Cary Phillips <cary@ilm.com>
* Fix gcc compiler warning in testFun.cpp PR #250 changed the %lx to %llx to suppress an MSVC warning, but it introduced a gcc warning, where uint64_t is long, not long long. Better to leave it as %lx and just cast to long. It's only a printf anyway. Signed-off-by: Cary Phillips <cary@ilm.com> * cast to unsigned long long for %llx Signed-off-by: Cary Phillips <cary@ilm.com> * In printf, bit_cast to uint<n>_t and use PRIx<n> This shoudl properly avoid warnings on all platforms. Signed-off-by: Cary Phillips <cary@ilm.com> Signed-off-by: Cary Phillips <cary@ilm.com>
Signed-off-by: Chris Kulla <ckulla@gmail.com>
* Fix gcc compiler warning in testFun.cpp PR AcademySoftwareFoundation#250 changed the %lx to %llx to suppress an MSVC warning, but it introduced a gcc warning, where uint64_t is long, not long long. Better to leave it as %lx and just cast to long. It's only a printf anyway. Signed-off-by: Cary Phillips <cary@ilm.com> * cast to unsigned long long for %llx Signed-off-by: Cary Phillips <cary@ilm.com> * In printf, bit_cast to uint<n>_t and use PRIx<n> This shoudl properly avoid warnings on all platforms. Signed-off-by: Cary Phillips <cary@ilm.com> Signed-off-by: Cary Phillips <cary@ilm.com>
Signed-off-by: Chris Kulla <ckulla@gmail.com>
* Fix gcc compiler warning in testFun.cpp PR #250 changed the %lx to %llx to suppress an MSVC warning, but it introduced a gcc warning, where uint64_t is long, not long long. Better to leave it as %lx and just cast to long. It's only a printf anyway. Signed-off-by: Cary Phillips <cary@ilm.com> * cast to unsigned long long for %llx Signed-off-by: Cary Phillips <cary@ilm.com> * In printf, bit_cast to uint<n>_t and use PRIx<n> This shoudl properly avoid warnings on all platforms. Signed-off-by: Cary Phillips <cary@ilm.com> Signed-off-by: Cary Phillips <cary@ilm.com>
MSVC is fairly picking about casts that potentially loose precision. This made up the bulk of the warnings that occur out of the box on windows.
None of these are particularly serious and they almost all occur inside unit tests, but hopefully by fixing them it makes it more obvious if there are new warnings introduced in the future.