* src/bdf/bdflib.c: removing compiler warnings

This commit is contained in:
David Turner 2005-03-15 23:48:15 +00:00
parent 58609c40c8
commit 5d02b8a151
2 changed files with 17 additions and 2 deletions

View File

@ -1,5 +1,19 @@
2005-03-15 David Turner <david@freetype.org>
* src/bdf/bdflib.c: removing compiler warnings
* docs/CHANGES: updating
* src/type1/t1parse.c (T1_New_Parser), src/type42/t42parse.c
(t42_parser_init): modifying functions to check the font header before
allocating anything on the heap.
* internal/freetype/ftmemory.h: introducing the new macros FT_ARRAY_MAX
and FT_ARRAY_CHECK
* src/pcf/pcfread.c, src/pcf/pcfutil.c: minor fixes and simplifications.
try to protect the PCF driver from doing stupid things with broken fonts.
* src/lzw/ftlzw.c (FT_Stream_OpenLZW): modified the function to check
the LZW header before doing anything else. This helps avoid un-necessary
heap allocations (400 Kb of heap memory for the LZW decoder ! Oh my !)

View File

@ -415,7 +415,7 @@
{
FT_Error error = 0;
if ( num_items > list->size )
if ( num_items > (int)list->size )
{
int oldsize = list->size;
int newsize = oldsize + (oldsize >> 1) + 4;
@ -637,12 +637,13 @@
cursor = 0;
refill = 1;
to_skip = NO_SKIP;
bytes = 0; /* make compiler happy */
for (;;)
{
if ( refill )
{
bytes = (int) FT_Stream_TryRead( stream, buf + cursor,
bytes = (int) FT_Stream_TryRead( stream, (FT_Byte*)buf + cursor,
(FT_ULong)(buf_size - cursor) );
avail = cursor + bytes;
cursor = 0;