From f47acf2b5fcd9d6c9dc58809ef8ecf1b1e0b46ad Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 12 Jan 2009 20:11:14 +0000 Subject: [PATCH] Avoid compiler warnings. * */*: s/do ; while ( 0 )/do { } while ( 0 )/. Reported by Sean McBride . --- ChangeLog | 7 +++++++ include/freetype/internal/ftdebug.h | 8 ++++---- src/autofit/aftypes.h | 2 +- src/gxvalid/gxvcommn.h | 8 ++++---- src/otvalid/otvcommn.h | 10 +++++----- src/raster/ftraster.c | 10 +++++----- src/smooth/ftgrays.c | 6 +++--- 7 files changed, 29 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 659faf1b6..2bd1d1b7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-12 Werner Lemberg + + Avoid compiler warnings. + + * */*: s/do ; while ( 0 )/do { } while ( 0 )/. + Reported by Sean McBride . + 2009-01-12 Werner Lemberg Fix stdlib dependencies. diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h index d40af4fe1..7baae3531 100644 --- a/include/freetype/internal/ftdebug.h +++ b/include/freetype/internal/ftdebug.h @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by */ +/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -92,7 +92,7 @@ FT_BEGIN_HEADER #else /* !FT_DEBUG_LEVEL_TRACE */ -#define FT_TRACE( level, varformat ) do ; while ( 0 ) /* nothing */ +#define FT_TRACE( level, varformat ) do { } while ( 0 ) /* nothing */ #endif /* !FT_DEBUG_LEVEL_TRACE */ @@ -178,7 +178,7 @@ FT_BEGIN_HEADER #else /* !FT_DEBUG_LEVEL_ERROR */ -#define FT_ERROR( varformat ) do ; while ( 0 ) /* nothing */ +#define FT_ERROR( varformat ) do { } while ( 0 ) /* nothing */ #endif /* !FT_DEBUG_LEVEL_ERROR */ @@ -201,7 +201,7 @@ FT_BEGIN_HEADER #else /* !FT_DEBUG_LEVEL_ERROR */ -#define FT_ASSERT( condition ) do ; while ( 0 ) +#define FT_ASSERT( condition ) do { } while ( 0 ) #endif /* !FT_DEBUG_LEVEL_ERROR */ diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h index 56811f0e4..bb59e1b40 100644 --- a/src/autofit/aftypes.h +++ b/src/autofit/aftypes.h @@ -69,7 +69,7 @@ extern void* _af_debug_hints; #else /* !AF_DEBUG */ -#define AF_LOG( x ) do ; while ( 0 ) /* nothing */ +#define AF_LOG( x ) do { } while ( 0 ) /* nothing */ #endif /* !AF_DEBUG */ diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h index 0128eca79..198d8e4fc 100644 --- a/src/gxvalid/gxvcommn.h +++ b/src/gxvalid/gxvcommn.h @@ -275,11 +275,11 @@ FT_BEGIN_HEADER #else /* !FT_DEBUG_LEVEL_TRACE */ -#define GXV_INIT do ; while ( 0 ) -#define GXV_NAME_ENTER( name ) do ; while ( 0 ) -#define GXV_EXIT do ; while ( 0 ) +#define GXV_INIT do { } while ( 0 ) +#define GXV_NAME_ENTER( name ) do { } while ( 0 ) +#define GXV_EXIT do { } while ( 0 ) -#define GXV_TRACE( s ) do ; while ( 0 ) +#define GXV_TRACE( s ) do { } while ( 0 ) #endif /* !FT_DEBUG_LEVEL_TRACE */ diff --git a/src/otvalid/otvcommn.h b/src/otvalid/otvcommn.h index 7c06b16ff..71726d5b2 100644 --- a/src/otvalid/otvcommn.h +++ b/src/otvalid/otvcommn.h @@ -192,12 +192,12 @@ FT_BEGIN_HEADER valid->func[2] = OTV_FUNC( z ); \ FT_END_STMNT -#define OTV_INIT do ; while ( 0 ) -#define OTV_ENTER do ; while ( 0 ) -#define OTV_NAME_ENTER( name ) do ; while ( 0 ) -#define OTV_EXIT do ; while ( 0 ) +#define OTV_INIT do { } while ( 0 ) +#define OTV_ENTER do { } while ( 0 ) +#define OTV_NAME_ENTER( name ) do { } while ( 0 ) +#define OTV_EXIT do { } while ( 0 ) -#define OTV_TRACE( s ) do ; while ( 0 ) +#define OTV_TRACE( s ) do { } while ( 0 ) #endif /* !FT_DEBUG_LEVEL_TRACE */ diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 35e2fd213..ccb2e783b 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -181,13 +181,13 @@ /* Disable the tracing mechanism for simplicity -- developers can */ /* activate it easily by redefining these two macros. */ #ifndef FT_ERROR -#define FT_ERROR( x ) do ; while ( 0 ) /* nothing */ +#define FT_ERROR( x ) do { } while ( 0 ) /* nothing */ #endif #ifndef FT_TRACE -#define FT_TRACE( x ) do ; while ( 0 ) /* nothing */ -#define FT_TRACE1( x ) do ; while ( 0 ) /* nothing */ -#define FT_TRACE6( x ) do ; while ( 0 ) /* nothing */ +#define FT_TRACE( x ) do { } while ( 0 ) /* nothing */ +#define FT_TRACE1( x ) do { } while ( 0 ) /* nothing */ +#define FT_TRACE6( x ) do { } while ( 0 ) /* nothing */ #endif #define Raster_Err_None 0 @@ -370,7 +370,7 @@ #define RAS_VARS /* void */ #define RAS_VAR /* void */ -#define FT_UNUSED_RASTER do ; while ( 0 ) +#define FT_UNUSED_RASTER do { } while ( 0 ) #else /* FT_STATIC_RASTER */ diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 571b57a31..10fa2ae72 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -163,9 +163,9 @@ #else /* !FT_DEBUG_LEVEL_TRACE */ -#define FT_TRACE5( x ) do ; while ( 0 ) /* nothing */ -#define FT_TRACE7( x ) do ; while ( 0 ) /* nothing */ -#define FT_ERROR( x ) do ; while ( 0 ) /* nothing */ +#define FT_TRACE5( x ) do { } while ( 0 ) /* nothing */ +#define FT_TRACE7( x ) do { } while ( 0 ) /* nothing */ +#define FT_ERROR( x ) do { } while ( 0 ) /* nothing */ #endif /* !FT_DEBUG_LEVEL_TRACE */