[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] freetype 2.3.8 warnings
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] freetype 2.3.8 warnings |
Date: |
Fri, 23 Jan 2009 08:03:00 +0100 (CET) |
> >> base/fttrigon.c:439: warning: right shift count >= width of type
>
> I guess it can be related with LP64 issue. In my LP64 patch,
> there was a modification of fttrigon.c aslike: [...]
>
> - FT_Int32 half = 1L << ( shift - 1 );
> + FT_Int32 half = (FT_Int32)1L << ( shift - 1 );
>
>
> vec->x = ( v.x + half + FT_SIGN_LONG( v.x ) ) >> shift; /* WARNED */
> vec->y = ( v.y + half + FT_SIGN_LONG( v.y ) ) >> shift; /* WARNED */
Hmm. For me, the `right shift count' is the number of shifts to the
right. In the above code, ths is the value of the variable `shift'.
In case you are correct, the above error message is extremely
misleading.
Werner