We retrieve these from their respective functions arguments as const, and can trivially respect that. --- drw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drw.c b/drw.c index ced7d37..b9fa818 100644 --- a/drw.c +++ b/drw.c @@ -119,7 +119,7 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern) fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname); return NULL; } - if (!(pattern = FcNameParse((FcChar8 *) fontname))) { + if (!(pattern = FcNameParse((const FcChar8 *) fontname))) { fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname); XftFontClose(drw->dpy, xfont); return NULL; @@ -433,7 +433,7 @@ drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, if (!font || !text) return; - XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext); + XftTextExtentsUtf8(font->dpy, font->xfont, (const XftChar8 *)text, len, &ext); if (w) *w = ext.xOff; if (h) -- 2.37.2