Google_Mathfu failed with warning C4100 when build with MSVC
QuellaZhang opened this issue · comments
Hi All,
I tried to build Mathfu with Visual studio 2017 on Windows Server 2016, but it failed with warning C4100: 'precision': unreferenced formal parameter. This issue can be reproduced from master revision a120edf. Could you help have a look about this issue? Thanks in advance!
We have made workaround for this: google_mathfu_warning_c4100.patch.txt
Steps to Reproduce:
- git clone --recursive https://github.com/google/mathfu.git D:\Google-MathFu\src
- Open a VS 2017 command prompt and browse to D:\Google-MathFu
- mkdir build_x86 && pushd build_x86
- cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 ..\src
- msbuild /p:Configuration=Release;Platform=Win32 .\mathfu.sln /t:Rebuild
Actual result:
D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(117): error C2220: warning treated as error - no 'object' file generated
D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(117): warning C4100: 'precision': unreferenced formal parameter
D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(130): note: see reference to function template instantiation 'void anonymous-namespace'::TestHelpers_Test<float>(const T &)' being compiled with [ T=float ] D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(338): warning C4100: 'precision': unreferenced formal parameter D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(367): note: see reference to function template instantiation 'void
anonymous-namespace'::MultQuatFloatFlipsQuat_Test(const T &)' being compiled
with
[
T=float
]
D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(437): warning C4100: 'precision': unreferenced formal parameter
D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(470): note: see reference to function template instantiation 'void anonymous-namespace'::ToAngleAxisReturnsSmallQuat_Test<float>(const T &)' being compiled with [ T=float ] D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(625): warning C4100: 'precision': unreferenced formal parameter D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(645): note: see reference to function template instantiation 'void
anonymous-namespace'::SlerpResultIsUnit_Test(const T &)' being compiled
with
[
T=float
]
D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(688): warning C4100: 'precision': unreferenced formal parameter
D:\Google-MathFu\src\unit_tests\quaternion_test\quaternion_test.cpp(715): note: see reference to function template instantiation 'void `anonymous-namespace'::Slerp_Test(const T &)' being compiled
with
[
T=float
]