freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype-demos][master] Fix clang warnings.


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype-demos][master] Fix clang warnings.
Date: Fri, 25 Aug 2023 16:32:52 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType Demo Programs

Commits:

  • e2566717
    by Werner Lemberg at 2023-08-25T18:31:00+02:00
    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`.
    

3 changed files:

Changes:

  • graph/gblblit.c
    ... ... @@ -250,7 +250,7 @@ gblender_glyph_upgray( grBitmap* glyph )
    250 250
     {
    
    251 251
       int        i, size = abs( glyph->pitch ) * glyph->rows;
    
    252 252
       uint32_t*  buf = (uint32_t*)glyph->buffer;
    
    253
    -  uint32_t   scale = 255U / ( glyph->grays - 1 );
    
    253
    +  uint32_t   scale = 255U / (uint32_t)( glyph->grays - 1 );
    
    254 254
     
    
    255 255
     
    
    256 256
       /* four bytes at a time */
    

  • src/ftdump.c
    ... ... @@ -845,7 +845,7 @@
    845 845
         FT_UInt  num_names = FT_Get_Sfnt_Name_Count( face );
    
    846 846
         FT_UInt  i;
    
    847 847
     
    
    848
    -    FT_SfntName  name;
    
    848
    +    FT_SfntName  name = { 0, 0, 0, 0, NULL, 0 };
    
    849 849
     
    
    850 850
     
    
    851 851
         for ( i = 0; i < num_names; i++ )
    

  • src/ftmulti.c
    ... ... @@ -399,7 +399,7 @@
    399 399
     
    
    400 400
         while ( i < num_glyphs )
    
    401 401
         {
    
    402
    -      if ( !( error = LoadChar( i, hinted ) ) )
    
    402
    +      if ( !( error = LoadChar( (unsigned int)i, hinted ) ) )
    
    403 403
           {
    
    404 404
     #ifdef DEBUG
    
    405 405
             if ( i <= first_glyph + 6 )
    


  • reply via email to

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