incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Janík <Pa...@Janik.cz>
Subject Re: svn commit: r1372411 - /incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par5.cxx
Date Tue, 14 Aug 2012 14:27:31 GMT
Hi Oliver,

On Aug 14, 2012, at 4:15 PM, Oliver-Rainer Wittmann wrote:

>>> --- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par5.cxx (original)
>>> +++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par5.cxx Mon Aug 13 13:04:34
2012
>> 
>>> +                            const sal_Unicode cC = sPart.GetChar(nBegin+1);
>>> +                            if ( (-1 < cC) && (cC < 32) )
>> 
>> This code results in this warning:
>> 
>> sw/source/filter/ww8/ww8par5.cxx:2588: warning: comparison is always true due to
limited range of data type
>> 
>> Please fix this.
>> 
> 
> Hm.
> 
> This the first sample document attached to issue 119440 I am observing that this comparison
is not always true. I debugged the this code during my patch review.
> The string <sPart> contains data from an imported Microsoft Word document which
is not a fix.
> 
> May be I have overseen something.
> Pavel, can you provide further information why in your environment this comparison is
always true?


I think that

Pavel-Janiks-MacBook-Pro:ooo_trunk_src pavel$ grep -r sal_Unicode sal | grep typedef
...
sal/inc/sal/types.h:	typedef sal_uInt16          sal_Unicode;
...
Pavel-Janiks-MacBook-Pro:ooo_trunk_src pavel$ 

and thus sal_Unicode is unsigned here...

Maybe on Windows it is not:

sal/inc/sal/types.h:	typedef wchar_t             sal_Unicode;
-- 
Pavel Janík




Mime
View raw message