summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-01-01 18:07:27 +0000
committerMatthieu Herrb <matthieu@herrb.eu>2021-08-30 19:48:38 +0200
commitfb27afc921300f6ea2e0852abc5f9612caf92cf2 (patch)
tree4151b09e87085d335c13f12e01d106a687656926
parent827a38509c14a79666d98458a51c8361f832934f (diff)
Greeter: add parens to DRAW_STRING & TEXT_WIDTH macros
From Alan Coopersmith in xdm: Oracle Parfait static analyser points out it wasn't clear if cast or arithmetic operation in arguments at lines 410, 416, 431, & 433 was intended to be done first, so we'll make it explicit.
-rw-r--r--greeter/Login.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/greeter/Login.c b/greeter/Login.c
index 6ac1765..05a460f 100644
--- a/greeter/Login.c
+++ b/greeter/Login.c
@@ -223,14 +223,14 @@ static XtResource resources[] = {
#define TEXT_COLOR(f) (w->login.f##color.pixel)
#define TEXT_WIDTH(f, m, l) XmuXftTextWidth(XtDisplay (w), \
- w->login.f##Face, (FcChar8 *) m, l)
+ w->login.f##Face, (FcChar8 *) (m), l)
static int
XmuXftTextWidth(Display *dpy, XftFont *font, FcChar8 *string, int len);
#define DRAW_STRING(f, x, y, m, l) \
/* Debug("DRAW_STRING(%s, %d, %d, %s, %d)\n", #f, x, y, m, l); */ \
XftDrawString8 (w->login.draw, &w->login.f##color, w->login.f##Face, \
- x, y, (FcChar8 *) m, l)
+ x, y, (FcChar8 *) (m), l)
#define STRING_WIDTH(f, s) TEXT_WIDTH (f, s, strlen(s))