freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] Fix a couple of MSVC warnings.


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] Fix a couple of MSVC warnings.
Date: Mon, 06 Mar 2023 03:12:18 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • fc01e7dd
    by Alexei Podtelezhnikov at 2023-03-05T22:05:24-05:00
    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.
    

2 changed files:

Changes:

  • src/base/ftcalc.c
    ... ... @@ -1103,7 +1103,7 @@
    1103 1103
         for ( i = 0; i < count; ++i )
    
    1104 1104
           temp += (FT_Int64)s[i] * f[i];
    
    1105 1105
     
    
    1106
    -    return ( temp + 0x8000 ) >> 16;
    
    1106
    +    return (FT_Int32)( ( temp + 0x8000 ) >> 16 );
    
    1107 1107
     #else
    
    1108 1108
         temp.hi = 0;
    
    1109 1109
         temp.lo = 0;
    

  • src/sfnt/ttcolr.c
    ... ... @@ -699,7 +699,7 @@
    699 699
                                                  item_deltas ) )
    
    700 700
               return 0;
    
    701 701
     
    
    702
    -        apaint->u.solid.color.alpha += item_deltas[0];
    
    702
    +        apaint->u.solid.color.alpha += (FT_F2Dot14)item_deltas[0];
    
    703 703
           }
    
    704 704
     #endif
    
    705 705
     
    
    ... ... @@ -1646,7 +1646,7 @@
    1646 1646
               return 0;
    
    1647 1647
     
    
    1648 1648
             color_stop->stop_offset += F2DOT14_TO_FIXED( item_deltas[0] );
    
    1649
    -        color_stop->color.alpha += item_deltas[1];
    
    1649
    +        color_stop->color.alpha += (FT_F2Dot14)item_deltas[1];
    
    1650 1650
           }
    
    1651 1651
     #else
    
    1652 1652
           FT_UNUSED( var_index_base );
    


  • reply via email to

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