[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling under IRIX 6.5.x using native cc
From: |
Marek Fort |
Subject: |
Re: Compiling under IRIX 6.5.x using native cc |
Date: |
Mon, 11 Sep 2000 10:00:39 +0200 |
Hi,
I found that the problem is actually in "include/internal/ftstream.h"
lines 97 and 125 (in freetype2 beta8).
There is a casting from char* to unsigned short. SGI compilers complain
about such conversion. You have to cast (char*) to (unsigned int) first and
then the (unsigned int) to (unsigned short).
The values are always small enough to fit into the shorts.
--
Marek Fort
Simon Britnell wrote:
> When I attempt to compile,
>
> ccf/t2load.c gripes:
>
> "./src/cff/t2load.c", line 575: warning(1412): destination type of cast
> is too
> small to hold all pointers: truncation possible
> FT_FRAME_BYTE( CFF_Font, version_major ),
> ^
>
> "./src/cff/t2load.c", line 575: error(1069): integer conversion resulted
> in
> truncation
> FT_FRAME_BYTE( CFF_Font, version_major ),
> ^
>
> ... To cut a long story short, same for lines 576, 577 and 578
> version_minor, header_size and absolute_offset
>
> Having looked at the code, that macro is basically a field offset
> calculation of some description. From the error message, I conclude
> that the pointer resulting from
> (((CFF_Font*)0)->version_major) is too big to fit into a "short" which,
> on an Origin 2000, I would expect to be at least 16 bits. I'd also
> expect the result of the aforementioned pointer to fit in there easily.
> Has anyone else encountered this? Do I have scope to resize the
> FT_UShort holding the data? Does anyone have any other suggestions?