summaryrefslogtreecommitdiff
path: root/src/xftdpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xftdpy.c')
-rw-r--r--src/xftdpy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/xftdpy.c b/src/xftdpy.c
index 62b1ccf..6a32206 100644
--- a/src/xftdpy.c
+++ b/src/xftdpy.c
@@ -165,7 +165,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
_XftDisplayInfo = info;
info->glyph_memory = 0;
- info->max_glyph_memory = XftDefaultGetInteger (dpy,
+ info->max_glyph_memory = (unsigned long)XftDefaultGetInteger (dpy,
XFT_MAX_GLYPH_MEMORY, 0,
XFT_DPY_MAX_GLYPH_MEMORY);
if (XftDebug () & XFT_DBG_CACHE)
@@ -233,7 +233,7 @@ _XftDisplayManageMemory (Display *dpy)
}
while (info->glyph_memory > info->max_glyph_memory)
{
- glyph_memory = rand () % info->glyph_memory;
+ glyph_memory = (unsigned long)rand () % info->glyph_memory;
public = info->fonts;
while (public)
{
@@ -274,9 +274,9 @@ XftDefaultSet (Display *dpy, FcPattern *defaults)
info->defaults = defaults;
if (!info->max_glyph_memory)
info->max_glyph_memory = XFT_DPY_MAX_GLYPH_MEMORY;
- info->max_glyph_memory = XftDefaultGetInteger (dpy,
+ info->max_glyph_memory = (unsigned long)XftDefaultGetInteger (dpy,
XFT_MAX_GLYPH_MEMORY, 0,
- info->max_glyph_memory);
+ (int)info->max_glyph_memory);
if (!info->max_unref_fonts)
info->max_unref_fonts = XFT_DPY_MAX_UNREF_FONTS;
info->max_unref_fonts = XftDefaultGetInteger (dpy,
@@ -292,7 +292,7 @@ XftDefaultParseBool (const char *v)
c0 = *v;
if (isupper ((int)c0))
- c0 = tolower (c0);
+ c0 = (char)tolower (c0);
if (c0 == 't' || c0 == 'y' || c0 == '1')
return 1;
if (c0 == 'f' || c0 == 'n' || c0 == '0')
@@ -301,7 +301,7 @@ XftDefaultParseBool (const char *v)
{
c1 = v[1];
if (isupper ((int)c1))
- c1 = tolower (c1);
+ c1 = (char)tolower (c1);
if (c1 == 'n')
return 1;
if (c1 == 'f')
@@ -349,7 +349,7 @@ _XftDefaultInitInteger (Display *dpy, FcPattern *pat, const char *option)
{
if (FcNameConstant ((FcChar8 *) v, &i))
return FcPatternAddInteger (pat, option, i);
- i = strtol (v, &e, 0);
+ i = (int)strtol (v, &e, 0);
if (e != v)
return FcPatternAddInteger (pat, option, i);
}