diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2021-01-01 18:07:27 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2021-01-01 18:07:27 +0000 |
commit | 7daafd9146c6c72cf2463c63a26a9fdc127fd185 (patch) | |
tree | efbaf845523adc61681615966e6b1ce0e7ed7b30 /app/xenodm | |
parent | ab641d2f7d05af2b6a53b697fc5a1d5646233096 (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.
Diffstat (limited to 'app/xenodm')
-rw-r--r-- | app/xenodm/greeter/Login.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/xenodm/greeter/Login.c b/app/xenodm/greeter/Login.c index 6ac176507..05a460f2c 100644 --- a/app/xenodm/greeter/Login.c +++ b/app/xenodm/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)) |