From b7ebb9b042974874782f4e662bfc442bc96c5647 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 4 Nov 2023 12:24:49 -0700 Subject: Fix -Wimplicit-float-conversion warnings from clang mkfontscale.c:110:32: warning: implicit conversion loses floating-point precision: 'double' to 'float' [-Wimplicit-float-conversion] static float bigEncodingFuzz = 0.02; ~~~~~~~~~~~~~~~ ^~~~ mkfontscale.c:262:52: warning: implicit conversion loses floating-point precision: 'double' to 'float' [-Wimplicit-float-conversion] bigEncodingFuzz = atof(argv[argn + 1]) / 100.0; ~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ Signed-off-by: Alan Coopersmith --- mkfontscale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkfontscale.c b/mkfontscale.c index f9333ce..21fccff 100644 --- a/mkfontscale.c +++ b/mkfontscale.c @@ -107,7 +107,7 @@ ListPtr makeXLFD(char *filename, FT_Face face, int); static int readEncodings(ListPtr *encodingsToDo, char *dirname); static FT_Library ft_library; -static float bigEncodingFuzz = 0.02; +static float bigEncodingFuzz = 0.02f; static int relative; static int doScalable; @@ -259,7 +259,7 @@ main(int argc, char **argv) if (argn >= argc - 1) { missing_arg("-f"); } - bigEncodingFuzz = atof(argv[argn + 1]) / 100.0; + bigEncodingFuzz = strtof(argv[argn + 1], NULL) / 100.0f; argn += 2; } else if (strcmp(argv[argn], "-v") == 0) { -- cgit v1.2.3