[ 
https://issues.apache.org/jira/browse/THRIFT-3873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15812489#comment-15812489
 ] 

ASF GitHub Bot commented on THRIFT-3873:
----------------------------------------

Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1128#discussion_r95217047
  
    --- Diff: lib/cpp/src/thrift/transport/THeaderTransport.cpp ---
    @@ -394,15 +411,19 @@ void THeaderTransport::setHeader(const string& key, 
const string& value) {
       writeHeaders_[key] = value;
     }
     
    -size_t THeaderTransport::getMaxWriteHeadersSize() const {
    +uint32_t THeaderTransport::getMaxWriteHeadersSize() const {
       size_t maxWriteHeadersSize = 0;
       THeaderTransport::StringToStringMap::const_iterator it;
       for (it = writeHeaders_.begin(); it != writeHeaders_.end(); ++it) {
         // add sizes of key and value to maxWriteHeadersSize
         // 2 varints32 + the strings themselves
         maxWriteHeadersSize += 5 + 5 + (it->first).length() + 
(it->second).length();
       }
    -  return maxWriteHeadersSize;
    +  if (maxWriteHeadersSize > std::numeric_limits<uint32_t>().max()) {
    --- End diff --
    
    I have built all third party libraries under Visual Studio 2010, 2012, 
2013, and 2015 in x86 and x86 mode, in debug and release, in static and dynamic 
mode, where appropriate.  Then I build thrift in the same configurations.  I 
will be releasing the windows build instructions and contributed build batch 
files to the project so that they can be used as a reference on how to build 
thrift on windows for C++ with all of the features enabled, using cmake.


> Fix various compiler warnings when using VS2010
> -----------------------------------------------
>
>                 Key: THRIFT-3873
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3873
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.10.0
>         Environment: VS2010, Windows
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>            Priority: Minor
>
> While verifying a defect I had to build the windows thrift C++ library and 
> found a number of compiler warnings that needed to be cleaned up.  As part of 
> cleaning these up, I found that additional compilers were also posting 
> warnings.
> Acceptance Criteria:
> # I can build successfully with Visual Studio 2010 targeting x86 debug mode 
> with /WX (warnings are errors).
> # I can build successfully with Visual Studio 2010 targeting x86 release mode 
> with /WX (warnings are errors).
> # I can build successfully with Visual Studio 2010 targeting x64 debug mode 
> with /WX (warnings are errors).
> # I can build successfully with Visual Studio 2010 targeting x64 release mode 
> with /WX (warnings are errors).
> # I can build successfully with Visual Studio 2015 targeting x86 debug mode 
> with /WX (warnings are errors).
> # I can build successfully with Visual Studio 2015 targeting x86 release mode 
> with /WX (warnings are errors).
> # I can build successfully with Visual Studio 2015 targeting x64 debug mode 
> with /WX (warnings are errors).
> # I can build successfully with Visual Studio 2015 targeting x64 release mode 
> with /WX (warnings are errors).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to