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

Carel commented on THRIFT-5790:
-------------------------------

I also have notes of this warning happening but I suspect it does respect the 
{{/external}} flag. 

[C4245|https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4245?view=msvc-160]
{code}
C4245: 'return': conversion from 'int' to 'SOCKET', signed/unsigned mismatch
{code}

This one is not a major issue since it can be silenced but should also be 
looked at

> Thrift headers raise compiler warnings on MSVC
> ----------------------------------------------
>
>                 Key: THRIFT-5790
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5790
>             Project: Thrift
>          Issue Type: Bug
>         Environment: Windows
> MSVC compiler
>            Reporter: Carel
>            Assignee: Carel
>            Priority: Major
>
> When building a C++ application using MSVC (2019) the following warnings are 
> raised:
> [c4706|https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4706?view=msvc-160]
> {code}
> <...>\include\thrift\protocol\TBinaryProtocol.tcc(453) : warning C4706: 
> assignment within conditional expression
> {code}
> This makes it impossible to build code using the warnings as errors option.
> One option could have been to mark the headers as external as discussed 
> [here|https://learn.microsoft.com/en-us/cpp/build/reference/external-external-headers-diagnostics?view=msvc-160]
>  but one should see on that page under Limitations:
> bq. Some warnings emitted by the compiler's back-end code generation aren't 
> affected by the /external options. These warnings usually start with C47XX, 
> though not all C47XX warnings are back-end warnings. You can still disable 
> these warnings individually by using /wd47XX. Code analysis warnings are also 
> unaffected, since they don't have warning levels.
> And as one would guess these all fall under that limitation. 
> Disabling the warning globally does work, but is not ideal for hopefully 
> obvious reasons.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to