* include/internal/ftmemory.h: Add some `FT_Offset' casts.

(FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
FT_MEM_MOVE): Do it.
This commit is contained in:
Werner Lemberg 2015-02-16 07:03:22 +01:00
parent 48186b8168
commit 587351b7e2
2 changed files with 23 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2015-02-16 Werner Lemberg <wl@gnu.org>
* include/internal/ftmemory.h: Add some `FT_Offset' casts.
(FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
FT_MEM_MOVE): Do it.
2015-02-15 Werner Lemberg <wl@gnu.org>
[base] Clean up signedness issues in `ftdbgmem.c'.

View File

@ -215,11 +215,14 @@ FT_BEGIN_HEADER
#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
#define FT_MEM_SET( dest, byte, count ) \
ft_memset( dest, byte, (FT_Offset)(count) )
#define FT_MEM_COPY( dest, source, count ) ft_memcpy( dest, source, count )
#define FT_MEM_COPY( dest, source, count ) \
ft_memcpy( dest, source, (FT_Offset)(count) )
#define FT_MEM_MOVE( dest, source, count ) ft_memmove( dest, source, count )
#define FT_MEM_MOVE( dest, source, count ) \
ft_memmove( dest, source, (FT_Offset)(count) )
#define FT_MEM_ZERO( dest, count ) FT_MEM_SET( dest, 0, count )
@ -227,14 +230,19 @@ FT_BEGIN_HEADER
#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) )
#define FT_ARRAY_ZERO( dest, count ) \
FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) )
#define FT_ARRAY_ZERO( dest, count ) \
FT_MEM_ZERO( dest, \
(FT_Offset)(count) * sizeof ( *(dest) ) )
#define FT_ARRAY_COPY( dest, source, count ) \
FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) )
#define FT_ARRAY_COPY( dest, source, count ) \
FT_MEM_COPY( dest, \
source, \
(FT_Offset)(count) * sizeof ( *(dest) ) )
#define FT_ARRAY_MOVE( dest, source, count ) \
FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )
#define FT_ARRAY_MOVE( dest, source, count ) \
FT_MEM_MOVE( dest, \
source, \
(FT_Offset)(count) * sizeof ( *(dest) ) )
/*