Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello,

Here is a report of cppcheck :
core/svtools/source/filter/sgvtext.cxx
365     duplicateExpression     style   Same expression on both sides of '||'.

Here is the line :
            if (c==EscSet || c==EscReset || c==EscDeflt || c==EscToggl)
FlgVal=c; else {<--- Same expression on both sides of '||'.

At first sight, there's no same expression but if we go further, we can see
this :
    139 #define  EscSet    '' /* Flag setzen                                              
*/
    140 #define  EscReset  '' /* Flag loeschen                                            
*/
    141 #define  EscDeflt  '\x11' /* Flag auf default setzen                               
*/
    142 #define  EscToggl  '' /* Flag Toggeln                                             
*/
    143 #define  EscRelat  '%'
    144 #define  EscNoFlg  0
    145 #define  EscNoVal  -2147483647 /* -MaxLongInt */

Now why EscSet = EscReset = EscToggl ?
I took a look at the git history and found the commit
9e5584a82633442467a53ccc08c3380070178a38 included something about "EscSet".
I tried to copy paste here to show you and had empty values (whereas it's
not empty at all !) :
+ #define  EscSet    '' /* Flag setzen                                              
*/
+ #define  EscReset  '' /* Flag loeschen                                            
*/
+ #define  EscDeflt  '\x11' /* Flag auf default setzen                               
*/
+ #define  EscToggl  '' /* Flag Toggeln                                             
*/
+ #define  EscRelat  '%'
+ #define  EscNoFlg  0
+ #define  EscNoVal  -2147483647 /* -MaxLongInt */

Special characters/encoding problem ?

Julien.


--
View this message in context: 
http://nabble.documentfoundation.org/Same-expression-on-both-sides-of-in-svtools-source-filter-sgvtext-cxx-tp3700983p3700983.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.