Commit f47acf2b5fcd9d6c9dc58809ef8ecf1b1e0b46ad

Werner Lemberg 2009-01-12T20:11:14

Avoid compiler warnings. * */*: s/do ; while ( 0 )/do { } while ( 0 )/. Reported by Sean McBride <sean@rogue-research.com>.

diff --git a/ChangeLog b/ChangeLog
index 659faf1..2bd1d1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-01-12  Werner Lemberg  <wl@gnu.org>
 
+	Avoid compiler warnings.
+
+	* */*: s/do ; while ( 0 )/do { } while ( 0 )/.
+	Reported by Sean McBride <sean@rogue-research.com>.
+
+2009-01-12  Werner Lemberg  <wl@gnu.org>
+
 	Fix stdlib dependencies.
 
 	Problem reported by Mickey Gabel <mickey@monfort.co.il>.
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index d40af4f..7baae35 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 56811f0..bb59e1b 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 0128eca..198d8e4 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 7c06b16..71726d5 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 35e2fd2..ccb2e78 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 571b57a..10fa2ae 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 */