Skip to content

Fix C4244 warning for int-char conversion#1

Merged
BonneCW merged 1 commit intoClockworkOrigins:masterfrom
alexkaratarakis:master
Feb 18, 2017
Merged

Fix C4244 warning for int-char conversion#1
BonneCW merged 1 commit intoClockworkOrigins:masterfrom
alexkaratarakis:master

Conversation

@alexkaratarakis
Copy link
Copy Markdown
Contributor

@alexkaratarakis alexkaratarakis commented Feb 17, 2017

Visual Studio 2017 triggers a a warning about int-char conversion that was not there before in VS2015.
Since clockUtils' warnings are treated as errors this causes the build to fail:

         E:\workspace\vcpkgspace\buildtrees\clockutils\src\clockUtils-1.1.1\libs\argParser\src\BasicVariable.cpp(69): note: see reference to function template instantiation '_OutIt std::transform<std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>,std::_String_iterator<std::_String_val<std::_Simple_types<char>>>,int(__cdecl *)(int)>(_InIt,_InIt,_OutIt,_Fn1)' being compiled
                 with
                 [
                     _OutIt=std::_String_iterator<std::_String_val<std::_Simple_types<char>>>,
                     _InIt=std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>,
                     _Fn1=int (__cdecl *)(int)
                 ]
     5>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.10.25010\include\algorithm(946): warning C4244: '=': conversion from 'int' to 'char', possible loss of data (compiling source file E:\workspace\vcpkgspace\buildtrees\clockutils\src\clockUtils-1.1.1\libs\argParser\src\BasicVariable.cpp) 

This PR fixes the warning and enables building with v141 (VS2017).

edit: related: microsoft/vcpkg#677

@BonneCW
Copy link
Copy Markdown
Member

BonneCW commented Feb 18, 2017

Thanks for this fix and trying clockUtils with VS2017.

@BonneCW BonneCW merged commit 3651f23 into ClockworkOrigins:master Feb 18, 2017
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

Successfully merging this pull request may close these issues.

2 participants