summaryrefslogtreecommitdiff
path: root/mkfontscale.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-11-04 12:24:49 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-11-06 14:19:08 -0800
commitb7ebb9b042974874782f4e662bfc442bc96c5647 (patch)
tree024f4cea828bb4dedc66cd23a2f097d3e8c0e09d /mkfontscale.c
parent3bc4d05ff753c1b8357455a614bc5d11fffcfc0e (diff)
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 <alan.coopersmith@oracle.com>
Diffstat (limited to 'mkfontscale.c')
-rw-r--r--mkfontscale.c4
1 files 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) {