freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master fc01e7dd6: Fix a couple of MSVC warnings.


From: Werner Lemberg
Subject: [freetype2] master fc01e7dd6: Fix a couple of MSVC warnings.
Date: Sun, 5 Mar 2023 22:12:27 -0500 (EST)

branch: master
commit fc01e7dd6710efade138d41b832dcd3f5893e3f9
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    Fix a couple of MSVC warnings.
    
    * src/base/ftcalc.c (FT_MulAddFix): Add cast.
    * src/sfnt/ttcolr.c (tt_face_get_colorline_stops, read_paint): Ditto.
---
 src/base/ftcalc.c | 2 +-
 src/sfnt/ttcolr.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 13e74f335..997921883 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -1103,7 +1103,7 @@
     for ( i = 0; i < count; ++i )
       temp += (FT_Int64)s[i] * f[i];
 
-    return ( temp + 0x8000 ) >> 16;
+    return (FT_Int32)( ( temp + 0x8000 ) >> 16 );
 #else
     temp.hi = 0;
     temp.lo = 0;
diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
index 057f9bd65..69ccf0ee7 100644
--- a/src/sfnt/ttcolr.c
+++ b/src/sfnt/ttcolr.c
@@ -699,7 +699,7 @@
                                              item_deltas ) )
           return 0;
 
-        apaint->u.solid.color.alpha += item_deltas[0];
+        apaint->u.solid.color.alpha += (FT_F2Dot14)item_deltas[0];
       }
 #endif
 
@@ -1646,7 +1646,7 @@
           return 0;
 
         color_stop->stop_offset += F2DOT14_TO_FIXED( item_deltas[0] );
-        color_stop->color.alpha += item_deltas[1];
+        color_stop->color.alpha += (FT_F2Dot14)item_deltas[1];
       }
 #else
       FT_UNUSED( var_index_base );



reply via email to

[Prev in Thread] Current Thread [Next in Thread]