freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] master e256671: Fix clang warnings.


From: Werner Lemberg
Subject: [freetype2-demos] master e256671: Fix clang warnings.
Date: Fri, 25 Aug 2023 12:32:59 -0400 (EDT)

branch: master
commit e2566717c2b97d460573f6dd8a7a40cb4f63bd04
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>

    Fix clang warnings.
    
    * graph/gblblit.c (gblender_glyph_upgray), src/ftmulti.c (Render_All): Add
      cast.
    * src/ftdump.c (get_english_name_entry): Initialize `name`.
---
 graph/gblblit.c | 2 +-
 src/ftdump.c    | 2 +-
 src/ftmulti.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/graph/gblblit.c b/graph/gblblit.c
index 049a2b9..6676b56 100644
--- a/graph/gblblit.c
+++ b/graph/gblblit.c
@@ -250,7 +250,7 @@ gblender_glyph_upgray( grBitmap*  glyph )
 {
   int        i, size = abs( glyph->pitch ) * glyph->rows;
   uint32_t*  buf = (uint32_t*)glyph->buffer;
-  uint32_t   scale = 255U / ( glyph->grays - 1 );
+  uint32_t   scale = 255U / (uint32_t)( glyph->grays - 1 );
 
 
   /* four bytes at a time */
diff --git a/src/ftdump.c b/src/ftdump.c
index 2c0ae6f..c159d3e 100644
--- a/src/ftdump.c
+++ b/src/ftdump.c
@@ -845,7 +845,7 @@
     FT_UInt  num_names = FT_Get_Sfnt_Name_Count( face );
     FT_UInt  i;
 
-    FT_SfntName  name;
+    FT_SfntName  name = { 0, 0, 0, 0, NULL, 0 };
 
 
     for ( i = 0; i < num_names; i++ )
diff --git a/src/ftmulti.c b/src/ftmulti.c
index 9da2d62..7863336 100644
--- a/src/ftmulti.c
+++ b/src/ftmulti.c
@@ -399,7 +399,7 @@
 
     while ( i < num_glyphs )
     {
-      if ( !( error = LoadChar( i, hinted ) ) )
+      if ( !( error = LoadChar( (unsigned int)i, hinted ) ) )
       {
 #ifdef DEBUG
         if ( i <= first_glyph + 6 )



reply via email to

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