Hi Takashi Ono,

Am 30.11.2007 23:20, Takashi Ono schrieb:
> 
> I found a strange code in sw/source/core/txtnode/fntcache.cxx.
> The line #787 is causing warning "comparison is always false due to limited 
> range 
> of data type" in mingw build.
> 
> It is in WNT only #if block and causes no warning in MSVC build.
> 
[...]

if( nDiff > 0 )
{
        ASSERT( nPrtAscent < USHRT_MAX, "GuessLeading: PrtAscent-Fault" );
        if ( USHRT_MAX < nPrtAscent )                   <--Here
                nPrtAscent = nPrtAscent + (USHORT)(( 2 * nDiff ) / 5);
}

[...]

you are right. Judging from older versions of this file I'm pretty sure
that this should mean

        if ( nPrtAscent < USHRT_MAX )
...

> I suspect that the comparison is wrong but I am not sure. Should I
raise an issue?

yes, you can assign it to me.

Thank you,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to