Skip to content
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

Miscellaneous MSVC warnings #224

Closed
seanmiddleditch opened this issue Oct 22, 2021 · 2 comments
Closed

Miscellaneous MSVC warnings #224

seanmiddleditch opened this issue Oct 22, 2021 · 2 comments
Assignees
Milestone

Comments

@seanmiddleditch
Copy link

Some various reactphysics3d tag v8.0.0 warnings in MSVC, other than those reported in #221 , #222 , #223 .

C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(197): warning C4244: 'return': conversion from 'double' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(205): warning C4244: 'return': conversion from 'reactphysics3d::decimal' to 'int', possible loss of data
C:\Build\External\reactphysics3d-src\src\collision\shapes\HeightFieldShape.cpp(48): warning C4244: 'initializing': conversion from 'int' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\src\collision\shapes\HeightFieldShape.cpp(48): warning C4244: 'initializing': conversion from 'int' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\src\collision\narrowphase\CapsuleVsConvexPolyhedronAlgorithm.cpp(127): warning C4456: declaration of 'capsuleToWorld' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\collision\narrowphase\CapsuleVsConvexPolyhedronAlgorithm.cpp(131): warning C4456: declaration of 'capsuleSegA' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\collision\narrowphase\CapsuleVsConvexPolyhedronAlgorithm.cpp(132): warning C4456: declaration of 'capsuleSegB' hides previous local declaration
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(197): warning C4244: 'return': conversion from 'double' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(205): warning C4244: 'return': conversion from 'reactphysics3d::decimal' to 'int', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(109): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(121): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(167): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(282): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\algorithm(2892): warning C4244: '=': conversion from 'int' to 'char', possible loss of data
C:\Build\External\reactphysics3d-src\src\collision\shapes\AABB.cpp(127): warning C4305: 'initializing': truncation from 'double' to 'reactphysics3d::decimal'
C:\Build\External\reactphysics3d-src\src\collision\PolyhedronMesh.cpp(155): warning C4244: 'argument': conversion from 'reactphysics3d::uint' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\engine\Timer.h(191): warning C4244: '+=': conversion from 'long double' to 'double', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(197): warning C4244: 'return': conversion from 'double' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(205): warning C4244: 'return': conversion from 'reactphysics3d::decimal' to 'int', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(109): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(121): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(167): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(282): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(530): warning C4244: '=': conversion from 'const reactphysics3d::uint' to 'reactphysics3d::uint8', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(531): warning C4244: '=': conversion from 'const reactphysics3d::uint' to 'reactphysics3d::uint8', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\algorithm(2892): warning C4244: '=': conversion from 'int' to 'char', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(118): warning C4715: 'reactphysics3d::Deque<unsigned int>::getItem': not all control paths return a value
C:\Build\External\reactphysics3d-src\src\systems\ContactSolverSystem.cpp(603): warning C4456: declaration of 'linearImpulse' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\ContactSolverSystem.cpp(646): warning C4456: declaration of 'deltaLambda' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\CollisionDetectionSystem.cpp(313): warning C4244: 'argument': conversion from 'reactphysics3d::uint64' to 'const reactphysics3d::uint', possible loss of data
C:\Build\External\reactphysics3d-src\src\systems\CollisionDetectionSystem.cpp(1039): warning C4457: declaration of 'contactPairs' hides function parameter
C:\Build\External\reactphysics3d-src\src\systems\CollisionDetectionSystem.cpp(1048): warning C4457: declaration of 'contactPairs' hides function parameter
C:\Build\External\reactphysics3d-src\src\systems\SolveSliderJointSystem.cpp(896): warning C4456: declaration of 'angularImpulseBody1' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveSliderJointSystem.cpp(900): warning C4456: declaration of 'w1' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveSliderJointSystem.cpp(909): warning C4456: declaration of 'angularImpulseBody2' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveSliderJointSystem.cpp(913): warning C4456: declaration of 'w2' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveSliderJointSystem.cpp(935): warning C4456: declaration of 'angularImpulseBody1' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveSliderJointSystem.cpp(939): warning C4456: declaration of 'w1' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveSliderJointSystem.cpp(948): warning C4456: declaration of 'angularImpulseBody2' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveSliderJointSystem.cpp(952): warning C4456: declaration of 'w2' hides previous local declaration
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(197): warning C4244: 'return': conversion from 'double' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(205): warning C4244: 'return': conversion from 'reactphysics3d::decimal' to 'int', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(109): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(121): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(167): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(282): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\algorithm(2892): warning C4244: '=': conversion from 'int' to 'char', possible loss of data
C:\Build\External\reactphysics3d-src\src\systems\SolveHingeJointSystem.cpp(459): warning C4456: declaration of 'angularImpulseBody1' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveHingeJointSystem.cpp(465): warning C4456: declaration of 'angularImpulseBody2' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveHingeJointSystem.cpp(484): warning C4456: declaration of 'angularImpulseBody1' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveHingeJointSystem.cpp(490): warning C4456: declaration of 'angularImpulseBody2' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveHingeJointSystem.cpp(513): warning C4456: declaration of 'angularImpulseBody1' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\systems\SolveHingeJointSystem.cpp(519): warning C4456: declaration of 'angularImpulseBody2' hides previous local declaration
C:\Build\External\reactphysics3d-src\src\engine\EntityManager.cpp(58): warning C4018: '<': signed/unsigned mismatch
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(450): warning C4244: '=': conversion from 'const reactphysics3d::uint' to 'reactphysics3d::uint8', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(452): warning C4244: '=': conversion from 'const reactphysics3d::uint' to 'reactphysics3d::uint8', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(330): warning C4244: 'initializing': conversion from 'const reactphysics3d::uint' to 'reactphysics3d::uint8', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(331): warning C4244: 'initializing': conversion from 'const reactphysics3d::uint' to 'reactphysics3d::uint8', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(530): warning C4244: '=': conversion from 'const reactphysics3d::uint' to 'reactphysics3d::uint8', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(531): warning C4244: '=': conversion from 'const reactphysics3d::uint' to 'reactphysics3d::uint8', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\containers\Deque.h(506): warning C4715: 'reactphysics3d::Deque<unsigned int>::getFront': not all control paths return a value
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(109): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(121): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(167): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(282): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(197): warning C4244: 'return': conversion from 'double' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(205): warning C4244: 'return': conversion from 'reactphysics3d::decimal' to 'int', possible loss of data
C:\Build\External\reactphysics3d-src\src\utils\DebugRenderer.cpp(174): warning C4244: 'initializing': conversion from 'double' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\src\utils\DebugRenderer.cpp(174): warning C4244: 'initializing': conversion from 'double' to 'const reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(197): warning C4244: 'return': conversion from 'double' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(205): warning C4244: 'return': conversion from 'reactphysics3d::decimal' to 'int', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(109): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(121): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(167): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(282): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\src\body\CollisionBody.cpp(374): warning C4456: declaration of 'collider' hides previous local declaration
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(197): warning C4244: 'return': conversion from 'double' to 'reactphysics3d::decimal', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\collision\shapes\HeightFieldShape.h(205): warning C4244: 'return': conversion from 'reactphysics3d::decimal' to 'int', possible loss of data
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(109): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(121): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(167): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Build\External\reactphysics3d-src\include\reactphysics3d\utils\DefaultLogger.h(282): warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
@DanielChappuis
Copy link
Owner

Thanks for reporting this.

As for issue #221, I am currently working on the 'develop' branch for the next release of the library. In this branch, I have spent some time to remove a lot of warnings. Since I am working mainly with gcc compiler, I will try to see if the warnings you have reported are still valid in the 'develop' branch when compiling with MSVC.

@DanielChappuis DanielChappuis self-assigned this Oct 26, 2021
@DanielChappuis DanielChappuis added this to the Version 0.9.0 milestone Oct 26, 2021
@DanielChappuis
Copy link
Owner

The fixes that I have done for the warnings in MSVC are now part of the version v0.9.0 that has just been released.

I am closing this issue but feel free to reopen it if you think this issue is not solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants