summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2018-01-04 20:32:46 +0900
committerAkira TAGOH <akira@tagoh.org>2018-01-04 20:37:26 +0900
commit767e3aa7c50c2a707b42d9eda879b1046558bb6f (patch)
tree1930361af3fb2c417b8c6ddd1347707f0298ff3c /src
parent706535e10715938c10e65e727feb607373ac1a47 (diff)
Fix compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/fccfg.c2
-rw-r--r--src/fcdir.c4
-rw-r--r--src/fcfreetype.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/fccfg.c b/src/fccfg.c
index 98440179..a55bcef0 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -47,7 +47,7 @@ retry_locale:
{
is_locale_initialized = FcTrue;
if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
- (void *)(long) is_locale_initialized))
+ (void *)(intptr_t) is_locale_initialized))
goto retry_locale;
setlocale (LC_ALL, "");
}
diff --git a/src/fcdir.c b/src/fcdir.c
index d6be0bec..bfcdf956 100644
--- a/src/fcdir.c
+++ b/src/fcdir.c
@@ -289,7 +289,9 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config)
struct stat dir_stat;
const FcChar8 *sysroot = FcConfigGetSysRoot (config);
FcChar8 *d;
+#ifndef _WIN32
int fd = -1;
+#endif
if (sysroot)
d = FcStrBuildFilename (sysroot, dir, NULL);
@@ -353,7 +355,9 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config)
FcStrSet *dirs;
const FcChar8 *sysroot = FcConfigGetSysRoot (config);
FcChar8 *d = NULL;
+#ifndef _WIN32
int fd = -1;
+#endif
cache = FcDirCacheLoad (dir, config, NULL);
if (!cache)
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index da2dc3f3..4af96b81 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1767,7 +1767,7 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
{
weight = FcIsWeight ((FcChar8 *) psfontinfo.weight);
if (FcDebug() & FC_DBG_SCANV)
- printf ("\tType1 weight %s maps to %d\n",
+ printf ("\tType1 weight %s maps to %g\n",
psfontinfo.weight, weight);
}
@@ -1845,7 +1845,7 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
{
weight = FcContainsWeight (style);
if (FcDebug() & FC_DBG_SCANV)
- printf ("\tStyle %s maps to weight %d\n", style, weight);
+ printf ("\tStyle %s maps to weight %g\n", style, weight);
}
if (width == -1)
{