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

Signed and unsigned compilation errors #171

Open
vukadinlaza opened this issue Apr 9, 2020 · 0 comments
Open

Signed and unsigned compilation errors #171

vukadinlaza opened this issue Apr 9, 2020 · 0 comments

Comments

@vukadinlaza
Copy link
Collaborator

vukadinlaza commented Apr 9, 2020

During my test of MSVC build I have found some places in the code that where compiler produce reasonable error. One of them is about unsigned types compared with signed or unary minus applied to unsigned. They clearly are developer's mistakes and needs to be fixed, as the may introduce bugs in logic.

[00:02:46] C:\projects\metric-wheels\metric\modules\distance\k-related\Standards.cpp(108,31): warning C4018: '<': signed/unsigned mismatch (compiling source file C:\projects\metric-wheels\metric\python\src\distance\standards.cpp) [C:\projects\metric-wheels\metric\python\build\temp.win-amd64-3.8\Release\src\distance\distance.vcxproj]
[00:02:46] C:\projects\metric-wheels\metric\python\src\distance\standards.cpp(67): message : see reference to function template instantiation 'V metric::Chebyshev<V>::operator ()<Container>(const Container &,const Container &) const' being compiled [C:\projects\metric-wheels\metric\python\build\temp.win-amd64-3.8\Release\src\distance\distance.vcxproj]
[00:02:46]           with
[00:02:46]           [
[00:02:46]               V=double,
[00:02:46]               Container=NumpyToVectorAdapter<double>
[00:02:46]           ]
[00:06:54] C:\projects\metric-wheels\metric\python\..\modules/utils/datasets.hpp(179,30): warning C4146: unary minus operator applied to unsigned type, result still unsigned (compiling source file C:\projects\metric-wheels\metric\python\src\utils\dataset.cpp) [C:\projects\metric-wheels\metric\python\build\temp.win-amd64-3.8\Release\src\utils\utils.vcxproj]
[00:05:36] C:\projects\metric-wheels\metric\modules\correlation\mgc.cpp(367,1): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\projects\metric-wheels\metric\python\build\temp.win-amd64-3.8\Release\src\correlation\mgc.vcxproj]
[00:05:36] C:\projects\metric-wheels\metric\python\src\correlation\mgc.cpp(71): message : see reference to function template instantiation 'std::vector<double,std::allocator<double>> metric::MGC_direct::xcorr<T>(const blaze::SymmetricMatrix<blaze::DynamicMatrix<double,false>,false,true,true> &,const blaze::SymmetricMatrix<blaze::DynamicMatrix<double,false>,false,true,true> &,const unsigned int)' being compiled [C:\projects\metric-wheels\metric\python\build\temp.win-amd64-3.8\Release\src\correlation\mgc.vcxproj]
[00:05:36] C:\projects\metric-wheels\metric\modules\correlation\mgc.cpp(372,1): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\projects\metric-wheels\metric\python\build\temp.win-amd64-3.8\Release\src\correlation\mgc.vcxproj]
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

1 participant