Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
2149b51f
by Werner Lemberg at 2021-03-13T19:08:09+01:00
6 changed files:
- ChangeLog
- src/base/ftstroke.c
- src/sdf/ftsdf.c
- src/sdf/ftsdfrend.c
- src/sfnt/sfwoff2.c
- src/truetype/ttgxvar.c
Changes:
1 |
+2021-03-13 Werner Lemberg <wl@gnu.org>
|
|
2 |
+ |
|
3 |
+ Handle various VC++ compiler warnings.
|
|
4 |
+ |
|
5 |
+ Fixes #1039.
|
|
6 |
+ |
|
7 |
+ * src/base/ftstroke.c (ft_stroker_inside, ft_stroker_outside):
|
|
8 |
+ Initialize `sigma`.
|
|
9 |
+ |
|
10 |
+ * src/sdf/ftsdf.c (sdf_generate_with_overlaps): Exit immediately if
|
|
11 |
+ function arguments are invalid.
|
|
12 |
+ * src/sdf/ftsdfrend.c (sdf_property_set) <"overlaps">: Fix cast.
|
|
13 |
+ |
|
14 |
+ * src/sfnt/sfwoff2.c (woff2_decompress)
|
|
15 |
+ [!FT_CONFIG_OPTION_USE_BROTLI]: Use `FT_UNUSED`.
|
|
16 |
+ |
|
17 |
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize `fvar_head`.
|
|
18 |
+ |
|
1 | 19 |
2021-03-11 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2 | 20 |
|
3 | 21 |
[smooth] Reduce copying during integration phase.
|
... | ... | @@ -974,7 +974,8 @@ |
974 | 974 |
FT_StrokeBorder border = stroker->borders + side;
|
975 | 975 |
FT_Angle phi, theta, rotate;
|
976 | 976 |
FT_Fixed length;
|
977 |
- FT_Vector sigma, delta;
|
|
977 |
+ FT_Vector sigma = { 0, 0 };
|
|
978 |
+ FT_Vector delta;
|
|
978 | 979 |
FT_Error error = FT_Err_Ok;
|
979 | 980 |
FT_Bool intersect; /* use intersection of lines? */
|
980 | 981 |
|
... | ... | @@ -1048,7 +1049,7 @@ |
1048 | 1049 |
{
|
1049 | 1050 |
/* this is a mitered (pointed) or beveled (truncated) corner */
|
1050 | 1051 |
FT_Fixed radius = stroker->radius;
|
1051 |
- FT_Vector sigma;
|
|
1052 |
+ FT_Vector sigma = { 0, 0 };
|
|
1052 | 1053 |
FT_Angle theta = 0, phi = 0;
|
1053 | 1054 |
FT_Bool bevel, fixed_bevel;
|
1054 | 1055 |
|
... | ... | @@ -3510,10 +3510,7 @@ |
3510 | 3510 |
head = NULL;
|
3511 | 3511 |
|
3512 | 3512 |
if ( !shape || !bitmap || !shape->memory )
|
3513 |
- {
|
|
3514 |
- error = FT_THROW( Invalid_Argument );
|
|
3515 |
- goto Exit;
|
|
3516 |
- }
|
|
3513 |
+ return FT_THROW( Invalid_Argument );
|
|
3517 | 3514 |
|
3518 | 3515 |
contour = shape->contours;
|
3519 | 3516 |
memory = shape->memory;
|
... | ... | @@ -110,7 +110,7 @@ |
110 | 110 |
|
111 | 111 |
else if ( ft_strcmp( property_name, "overlaps" ) == 0 )
|
112 | 112 |
{
|
113 |
- FT_Int val = *(const FT_Int*)value;
|
|
113 |
+ FT_Bool val = *(const FT_Bool*)value;
|
|
114 | 114 |
|
115 | 115 |
|
116 | 116 |
render->overlaps = val;
|
... | ... | @@ -341,6 +341,11 @@ |
341 | 341 |
|
342 | 342 |
#else /* !FT_CONFIG_OPTION_USE_BROTLI */
|
343 | 343 |
|
344 |
+ FT_UNUSED( dst );
|
|
345 |
+ FT_UNUSED( dst_size );
|
|
346 |
+ FT_UNUSED( src );
|
|
347 |
+ FT_UNUSED( src_size );
|
|
348 |
+ |
|
344 | 349 |
FT_ERROR(( "woff2_decompress: Brotli support not available.\n" ));
|
345 | 350 |
return FT_THROW( Unimplemented_Feature );
|
346 | 351 |
|
... | ... | @@ -2060,7 +2060,7 @@ |
2060 | 2060 |
FT_Var_Axis* a;
|
2061 | 2061 |
FT_Fixed* c;
|
2062 | 2062 |
FT_Var_Named_Style* ns;
|
2063 |
- GX_FVar_Head fvar_head;
|
|
2063 |
+ GX_FVar_Head fvar_head = { 0, 0, 0, 0, 0, 0 };
|
|
2064 | 2064 |
FT_Bool usePsName = 0;
|
2065 | 2065 |
FT_UInt num_instances;
|
2066 | 2066 |
FT_UInt num_axes;
|