[MPlayer-cvslog] r38468 - in trunk/gui: dialog/fileselect.c skin/font.c
    ib 
    subversion at mplayerhq.hu
       
    Sun Apr 21 12:59:35 EEST 2024
    
    
  
Author: ib
Date: Sun Apr 21 12:59:35 2024
New Revision: 38468
Log:
Add comments to justify code to compiler warnings.
Modified:
   trunk/gui/dialog/fileselect.c
   trunk/gui/skin/font.c
Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Sun Apr 21 12:57:46 2024	(r38467)
+++ trunk/gui/dialog/fileselect.c	Sun Apr 21 12:59:35 2024	(r38468)
@@ -735,7 +735,7 @@ static void fs_Destroy(void)
 
     g_hash_table_destroy(fsPathTable);
 
-    g_list_foreach(fsTopList_items, (GFunc)g_free, NULL);
+    g_list_foreach(fsTopList_items, (GFunc)g_free, NULL);  // deliberate cast between incompatible function types
     g_list_free(fsTopList_items);
     fsTopList_items = NULL;
 }
Modified: trunk/gui/skin/font.c
==============================================================================
--- trunk/gui/skin/font.c	Sun Apr 21 12:57:46 2024	(r38467)
+++ trunk/gui/skin/font.c	Sun Apr 21 12:59:35 2024	(r38468)
@@ -238,7 +238,7 @@ int fntRead(char *path, char *fname)
                         continue;
                 }
 
-                strncpy(Fonts[id]->bit8_chr + Fonts[id]->bit8_count * UTF8LENGTH, item, UTF8LENGTH);
+                strncpy(Fonts[id]->bit8_chr + Fonts[id]->bit8_count * UTF8LENGTH, item, UTF8LENGTH); // deliberate output truncation (no null-termination required)
 
                 i = Fonts[id]->bit8_count++ + ASCII_CHRS;
             } else
    
    
More information about the MPlayer-cvslog
mailing list