Commit 7e4b52d17be4462ff9c74907a70370fa154515f1

David Turner 2001-10-19T09:17:49

getting rid of compiler warnings

diff --git a/ChangeLog b/ChangeLog
index 37fb72e..62e1a7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2001-10-19  David Turner <david@freetype.org>
 
+	* src/smooth/ftgrays.c, src/pshinter/pshglob.h, src/pshinter/pshrec.c,
+	src/pshinter/pshalgo2.c: getting rid of compiler warnings
 
 	* src/pshinter/module.mk, src/pshinter/rules.mk: adding control files
 	to build the postscript hinter with the "old" build system
diff --git a/src/pshinter/pshalgo2.c b/src/pshinter/pshalgo2.c
index 0dcbfe8..a6e3b98 100644
--- a/src/pshinter/pshalgo2.c
+++ b/src/pshinter/pshalgo2.c
@@ -236,10 +236,10 @@
         
         if ( !psh2_hint_is_active(hint) )
         {
-          PSH2_Hint*  sort = table->sort;
           FT_UInt     count2;
           
 #if 0
+          PSH2_Hint*  sort = table->sort;
           PSH2_Hint   hint2;
 
           for ( count2 = count; count2 > 0; count2--, sort++ )
@@ -460,10 +460,6 @@
                                PSH_Globals      globals,
                                FT_Bool          vertical )
   {
-    PSH_Dimension  dim   = &globals->dimension[vertical];
-    FT_Fixed       scale = dim->scale_mult;
-    FT_Fixed       delta = dim->scale_delta;
-
     PSH2_Hint      hint;
     FT_UInt        count;
 
@@ -520,6 +516,7 @@
 #  define  print_zone(x)   do { } while (0)
 #endif
 
+#if 0
  /* setup interpolation zones once the hints have been grid-fitted */
  /* by the optimizer..                                             */
   static void
@@ -617,7 +614,7 @@
     table->num_zones = zone - table->zones;
     table->zone      = table->zones;
   }
-
+#endif
 
  /* tune a single coordinate with the current interpolation zones */  
   static FT_Pos
@@ -1074,7 +1071,6 @@
       FT_UInt          num_masks = table->hint_masks->num_masks;
       FT_UInt          first     = 0;
       FT_Int           major_dir = vertical ? PSH2_DIR_UP    : PSH2_DIR_RIGHT;
-      FT_Int           minor_dir = vertical ? PSH2_DIR_RIGHT : PSH2_DIR_UP;
       
       /* process secondary hints to "selected" points */
       if ( num_masks > 1 )
@@ -1136,7 +1132,6 @@
   {
     PSH_Dimension    dim   = &glyph->globals->dimension[vertical];
     FT_Fixed         scale = dim->scale_mult;
-    FT_Fixed         delta = dim->scale_delta;
 
     {
       FT_UInt     count = glyph->num_points;
diff --git a/src/pshinter/pshglob.h b/src/pshinter/pshglob.h
index dae74b4..1ded0cb 100644
--- a/src/pshinter/pshglob.h
+++ b/src/pshinter/pshglob.h
@@ -31,6 +31,7 @@ FT_BEGIN_HEADER
  /*****                                                            *****/
  /**********************************************************************/
  /**********************************************************************/
+
  /****************************************************************
   *
   * @constant: PS_GLOBALS_MAX_BLUE_ZONES
@@ -168,4 +169,4 @@ FT_BEGIN_HEADER
 
 FT_END_HEADER
 
-#endif __T1_FITTER_GLOBALS_H__
+#endif /* __T1_FITTER_GLOBALS_H__ */
diff --git a/src/pshinter/pshmod.c b/src/pshinter/pshmod.c
index c0fa29f..30fa440 100644
--- a/src/pshinter/pshmod.c
+++ b/src/pshinter/pshmod.c
@@ -29,7 +29,7 @@
     PSH_Globals_FuncsRec     globals_funcs;
     T1_Hints_FuncsRec        t1_funcs;
     T2_Hints_FuncsRec        t2_funcs;
-    
+
   } PS_Hinter_ModuleRec, *PS_Hinter_Module;
 
 
@@ -86,8 +86,8 @@
   {
     return &((PS_Hinter_Module)module)->t2_funcs;
   }
-  
-  
+
+
   FT_CALLBACK_DEF(PSHinter_Interface)
   pshinter_interface =
   {
@@ -112,5 +112,3 @@
     (FT_Module_Destructor)  ps_hinter_done,
     (FT_Module_Requester)   0  /* no additional interface for now */
   };
-
-  
\ No newline at end of file
diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c
index 8eb6810..659dc4a 100644
--- a/src/pshinter/pshrec.c
+++ b/src/pshinter/pshrec.c
@@ -168,7 +168,7 @@
     {
       error = ps_mask_ensure( mask, index+1, memory );
       if (error) goto Exit;
-      
+
       mask->num_bits = index+1;
     }
 
@@ -716,10 +716,10 @@
   ps_hints_done( PS_Hints   hints )
   {
     FT_Memory  memory = hints->memory;
-    
+
     ps_dimension_done( &hints->dimension[0], memory );
     ps_dimension_done( &hints->dimension[1], memory );
-    
+
     hints->error  = 0;
     hints->memory = 0;
   }
@@ -821,7 +821,7 @@
                     FT_Long*  stems )
   {
     FT_Error   error = 0;
-    
+
     if (!hints->error)
     {
       PS_Dimension  dim;
@@ -878,7 +878,7 @@
                     FT_UInt   end_point )
   {
     FT_Error  error = 0;
-    
+
     if ( !hints->error )
     {
       FT_Memory  memory = hints->memory;
@@ -1008,14 +1008,14 @@
         error = ps_dimension_end( &dim[1], end_point, memory );
       }
     }
-    
+
 #ifdef DEBUG_VIEW
     if (!error)
       the_ps_hints = hints;
-#endif    
+#endif
     return error;
   }
-  
+
  /***********************************************************************/
  /***********************************************************************/
  /*****                                                             *****/
@@ -1036,7 +1036,7 @@
                  FT_Long*    coords )
   {
     ps_hints_stem( (PS_Hints)hints, dimension, 1, coords );
-  }                 
+  }
 
 
   FT_LOCAL_DEF void
@@ -1051,8 +1051,8 @@
     funcs->reset    = (T1_Hints_ResetFunc)     ps_hints_t1reset;
     funcs->apply    = (T1_Hints_ApplyFunc)     PS_HINTS_APPLY_FUNC;
   }
-  
-  
+
+
 
  /***********************************************************************/
  /***********************************************************************/
@@ -1075,14 +1075,14 @@
                   FT_Fixed* coords )
   {
     FT_Long    stems[32], n, total = count;
-    
+
     while (total > 0)
     {
       /* determine number of stems to write */
       count = total;
       if ( count > 32 )
         count = 32;
-      
+
       /* compute integer stem position in font units */
       for ( n = 0; n < count*2; n++ )
         stems[n] = (coords[n] + 0x8000) >> 16;
@@ -1107,6 +1107,3 @@
     funcs->counter  = (T2_Hints_CounterFunc)  ps_hints_t2counter;
     funcs->apply    = (T2_Hints_ApplyFunc)    PS_HINTS_APPLY_FUNC;
   }
-  
-
-  
\ No newline at end of file
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 3b8fa70..5f2aef9 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1748,10 +1748,11 @@
   static int
   gray_convert_glyph( RAS_ARG )
   {
-    TBand     bands[40], *band;
-    int       n, num_bands;
-    TPos      min, max, max_y;
-    FT_BBox*  clip;
+    TBand             bands[40];
+    volatile  TBand*  band;
+    volatile  int     n, num_bands;
+    volatile  TPos    min, max, max_y;
+    FT_BBox*          clip;
 
 
     /* Set up state in the raster object */