getting rid of compiler warnings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
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 */