2006-08-27 Jens Claudius <jens.claudius@yahoo.com>
Fix miscellaneous compiler warnings. * freetype2/include/freetype/internal/ftobjs.h: close comment with `*/' to avoid `/* in comment' compiler warning. * freetype2/src/base/ftdbgmem.c (ft_mem_table_get_source): Turn cast `(FT_UInt32)(void*)' into `(FT_UInt32)(FT_PtrDist)(void*)' since on 64-bit platforms void* is larger than FT_UInt32. * freetype2/src/base/ftobjs.c (t_validator_error): cast away volatileness of argument to ft_longjmp. Spotted by Werner `Putzfrau' Lemberg. * freetype2/src/bdf/bdflib.c (bdf_load_font): initialize local variable `lineno'. * freetype2/src/gxvalid/gxvmod.c (classic_kern_validate): mark local variable `error' volatile.
This commit is contained in:
parent
c4c35b773d
commit
a787f45580
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
||||
2006-08-27 Jens Claudius <jens.claudius@yahoo.com>
|
||||
|
||||
Fix miscellaneous compiler warnings.
|
||||
|
||||
* freetype2/include/freetype/internal/ftobjs.h: close
|
||||
comment with `*/' to avoid `/* in comment' compiler warning.
|
||||
|
||||
* freetype2/src/base/ftdbgmem.c (ft_mem_table_get_source): Turn
|
||||
cast `(FT_UInt32)(void*)' into `(FT_UInt32)(FT_PtrDist)(void*)'
|
||||
since on 64-bit platforms void* is larger than FT_UInt32.
|
||||
|
||||
* freetype2/src/base/ftobjs.c (t_validator_error): cast
|
||||
away volatileness of argument to ft_longjmp. Spotted by
|
||||
Werner `Putzfrau' Lemberg.
|
||||
|
||||
* freetype2/src/bdf/bdflib.c (bdf_load_font): initialize
|
||||
local variable `lineno'.
|
||||
|
||||
* freetype2/src/gxvalid/gxvmod.c (classic_kern_validate):
|
||||
mark local variable `error' volatile.
|
||||
|
||||
2006-08-27 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* builds/unix/ftconfig.in: Synchronize with main ftconfig.h.
|
||||
|
@ -211,7 +211,7 @@ FT_BEGIN_HEADER
|
||||
/* this data when first opened. This field exists only if */
|
||||
/* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
|
||||
/* */
|
||||
/* force_autohing ::
|
||||
/* force_autohing :: */
|
||||
/* this boolean flag is used to instruct the glyph loader to */
|
||||
/* ignore the format-specific hinter, and use the auto-hinter */
|
||||
/* instead to load all glyphs. */
|
||||
|
@ -460,7 +460,9 @@
|
||||
FT_MemSource node, *pnode;
|
||||
|
||||
|
||||
hash = (FT_UInt32)(void*)_ft_debug_file +
|
||||
/* cast to FT_PtrDist first since void* can be larger */
|
||||
/* than FT_UInt32 and GCC 4.1.1 emits a warning */
|
||||
hash = (FT_UInt32)(FT_PtrDist)(void*)_ft_debug_file +
|
||||
(FT_UInt32)( 5 * _ft_debug_lineno );
|
||||
pnode = &table->sources[hash % FT_MEM_SOURCE_BUCKETS];
|
||||
|
||||
|
@ -89,8 +89,17 @@
|
||||
ft_validator_error( FT_Validator valid,
|
||||
FT_Error error )
|
||||
{
|
||||
/* since the cast below also disables the compiler's */
|
||||
/* type check, we introduce a dummy variable, which */
|
||||
/* will be optimized away */
|
||||
volatile jmp_buf* jump_buffer = &valid->jump_buffer;
|
||||
|
||||
|
||||
valid->error = error;
|
||||
ft_longjmp( valid->jump_buffer, 1 );
|
||||
|
||||
/* throw away volatileness; use `jump_buffer' or the */
|
||||
/* compiler may warn about an unused local variable */
|
||||
ft_longjmp( *(jmp_buf*) jump_buffer, 1 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2204,7 +2204,7 @@
|
||||
bdf_options_t* opts,
|
||||
bdf_font_t* *font )
|
||||
{
|
||||
unsigned long lineno;
|
||||
unsigned long lineno = 0; /* make compiler happy */
|
||||
_bdf_parse_t *p;
|
||||
|
||||
FT_Memory memory = extmemory;
|
||||
|
@ -197,7 +197,10 @@
|
||||
FT_Byte* volatile ckern = NULL;
|
||||
FT_ULong len_ckern = 0;
|
||||
|
||||
FT_Error error = GXV_Err_Ok;
|
||||
/* without volatile on `error' GCC 4.1.1. emits: */
|
||||
/* warning: variable 'error' might be clobbered by 'longjmp' or 'vfork' */
|
||||
/* this warning seems spurious but --- */
|
||||
FT_Error volatile error = GXV_Err_Ok;
|
||||
FT_ValidatorRec volatile valid;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user