]> granicus.if.org Git - graphviz/commitdiff
estimate_character_width_canonical: squash a -Wsign-conversion warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 9 Nov 2021 02:46:54 +0000 (18:46 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 14 Nov 2021 21:59:18 +0000 (13:59 -0800)
lib/common/textspan_lut.c

index 77977576fb716f1a2b355dd4e60a5c1fc80392cf..1825e6a5a5d4c61e10fe93507caf8c7c76c43810 100644 (file)
@@ -813,7 +813,7 @@ estimate_character_width_canonical(const short variant_metrics[128],
     width = 0;
   }
   assert(width >= 0);
-  return width;
+  return (unsigned short)width;
 }
 
 double estimate_text_width_1pt(const char *font_name, const char *text,