Re: [ft-devel] Build freetype2 64bit in windows

2012-12-17 Thread Werner LEMBERG


Dear 晓明, 


I've just stumbled across your old e-mail from April the 12th.

 freetype-2.4.9\src\bdf\bdflib.c(772): warning C4244: “function”:
   conversion from 'ptrdiff_t' to 'unsigned long',
   possible loss of data

 error = (*cb)( buf + start, end - start, lineno,
(void*)cb, client_data );

Fixed.

 freetype-2.4.9\src\base(39): warning C4306: “function”:
   conversion from ' int ' to ' FT_Pointer ' of greater size

 if ( svc == FT_SERVICE_UNAVAILABLE )
   // this line: FT_SERVICE_UNAVAILABLE is defined to ((FT_Pointer)-2)

I think I've fixed this and similar issues by using the `logical not'
operator (~) instead of a negative value.  Please test the current git.

 freetype-2.4.9\src\type1\t1load.c(618): warning C4244: “function”:
   conversion from 'FT_PtrDist' to 'FT_Long', possible loss of data

 if ( FT_ALLOC( blend-axis_names[n], len + 1 ) )

Fixed.

If you still get warnings please send the complete output to the list.


Werner
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Build freetype2 64bit in windows

2012-04-11 Thread 钱晓明
Hi, I am using solution file 'freetype.sln' in vc2010 directory to build 
freetype 2.4.9. I create new configuration for x64, and the build process has 
no error but with many warnings.
I see warings for these:
convert ptrdiff_t to unsigned long
convert int to FT_Pointer
convert FT_PtrDist to FT_Long
convert int to FT_UShort*

How should I configure my 64bit project for vc2010 to avoid these? I think 
these pointer operations aren't correct.

Thanks.
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Build freetype2 64bit in windows

2012-04-11 Thread suzuki toshiya

Hi,

Thank you for reporting your issue, please let me ask some question.

钱晓明 wrote:

Hi, I am using solution file 'freetype.sln' in vc2010 directory to build 
freetype 2.4.9. I create new configuration for x64, and the build process has 
no error but with many warnings.
I see warings for these:
convert ptrdiff_t to unsigned long


You mean that ptrdiff_t is unavailable (or incorrectly working) on Win64 so it should 
be replaced by unsigned long?


convert int to FT_Pointer


It looks odd (from int to FT_Pointer ???) I guess you mean that FT_Pointer should 
be replaced by int ?


convert FT_PtrDist to FT_Long


You mean that FT_PtrDist (it's alias of ptrdiff_t) is unavailable on Win64 so it should 
be replaced by FT_Long?
In above, you proposed to replace ptrdiff_t by unsigned long, so there is 
inconsistency. Which is right solution?


convert int to FT_UShort*


It looks odd (from int to FT_UShort* pointer???) I guess you mean that FT_UShort 
should be replaced by int ?
Again, there is a signedness inconsistency (signed int versus unsigned short).


How should I configure my 64bit project for vc2010 to avoid these? I think 
these pointer operations aren't correct.

Thanks.





___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Build freetype2 64bit in windows

2012-04-11 Thread 钱晓明
freetype-2.4.9\src\bdf\bdflib.c(772): warning C4244: “function”: conversion 
from 'ptrdiff_t' to 'unsigned long', possible loss of data
error = (*cb)( buf + start, end - start, lineno,
   (void*)cb, client_data );
 
 
freetype-2.4.9\src\base(39): warning C4306: “function”: conversion from ' int ' 
to ' FT_Pointer ' of greater size
FT_FACE_LOOKUP_SERVICE( face, service, WINFNT );
expand last line:
svc = FT_FACE( face )-internal-services. service_WINFNT;
if ( svc == FT_SERVICE_UNAVAILABLE ) // this line: FT_SERVICE_UNAVAILABLE is 
defined to ((FT_Pointer)-2)
svc = NULL;
..
 
 
freetype-2.4.9\src\type1\t1load.c(618): warning C4244: “function”: conversion 
from 'FT_PtrDist' to 'FT_Long', possible loss of data
if ( FT_ALLOC( blend-axis_names[n], len + 1 ) )
 
 
freetype-2.4.9\src\truetype\ttgxvar.c(1257): warning C4306: “conversion”: 
conversion from ' int ' to ' FT_UShort * ' of greater size
else if ( localpoints == ALL_POINTS ) // ALL_POINTS is defined to 
(FT_UShort*)(-1)

I check the code, and think these warnings should not be big problems. They 
only disturb me when turn to x64 configuration.

在2012-04-12,suzuki toshiya mpsuz...@hiroshima-u.ac.jp 写道: -原始邮件-
发件人:suzuki toshiya mpsuz...@hiroshima-u.ac.jp
发送时间:2012年04月12日 星期四
收件人:钱晓明 mailtoanta...@163.com
抄送:freetype-devel freetype-devel@nongnu.org
主题:Re: [ft-devel] Build freetype2 64bit in windows

Hi,

Thank you for reporting your issue, please let me ask some question.

钱晓明 wrote:
 Hi, I am using solution file 'freetype.sln' in vc2010 directory to build 
 freetype 2.4.9. I create new configuration for x64, and the build process has 
 no error but with many warnings.
 I see warings for these:
 convert ptrdiff_t to unsigned long

You mean that ptrdiff_t is unavailable (or incorrectly working) on Win64 so 
it should be replaced by unsigned long?

 convert int to FT_Pointer

It looks odd (from int to FT_Pointer ???) I guess you mean that 
FT_Pointer should be replaced by int ?

 convert FT_PtrDist to FT_Long

You mean that FT_PtrDist (it's alias of ptrdiff_t) is unavailable on Win64 so 
it should be replaced by FT_Long?
In above, you proposed to replace ptrdiff_t by unsigned long, so there is 
inconsistency. Which is right solution?

 convert int to FT_UShort*

It looks odd (from int to FT_UShort* pointer???) I guess you mean that 
FT_UShort should be replaced by int ?
Again, there is a signedness inconsistency (signed int versus unsigned short).

 How should I configure my 64bit project for vc2010 to avoid these? I think 
 these pointer operations aren't correct.

 Thanks.



 

 ___
 Freetype-devel mailing list
 Freetype-devel@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/freetype-devel

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel