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

Sebastian Geiger commented on LOGCXX-490:
-----------------------------------------

Hi,

using `while(!true)` gives the same result. I researched this a bit further and 
it seems that this is a common idiom in C++ and the problem is rather that the 
MSVC compiler should not treat it as a warning. According to the below link, 
this was fixed in MSVC2015 but I am still using MSVC2013 so I guess I will just 
disable the warning until I get a change to upgrade to a newer visual studio 
version

Sorry for the noise and thanks a lot for the fast response.

https://stackoverflow.com/questions/1946445/c-c-how-to-use-the-do-while0-construct-without-compiler-warnings-like-c412

> conditional expression is constant
> ----------------------------------
>
>                 Key: LOGCXX-490
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-490
>             Project: Log4cxx
>          Issue Type: Improvement
>            Reporter: Sebastian Geiger
>            Priority: Minor
>
> When I activate the /W4 warning level in MSVC 2013 I get the following 
> warning:
>  warning C4127: conditional expression is constant 
> The warning appears for all statements that use the LOG4CXX_* macros suchas 
> LOG4CXX_ERROR. I currently get more than 500 if these warnings, which makes 
> identifying more important warnings rather difficult.
> Of course I could disable the warning, but if this is something that could be 
> fixed in the log4cxx code then I think that would be a better solution.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to