diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-11-01 10:05:11 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-11-01 10:11:42 -0800 |
commit | 9505d391c72c90635453cc160b6f64e02da6a318 (patch) | |
tree | 6859c63529de37baeb595039920660617735b8ce | |
parent | 529ff7c9591e58c6003d7b330a80adf63fa5b736 (diff) |
Greeter: add parens to DRAW_STRING & TEXT_WIDTH macros for safety
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.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | greeter/Login.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/greeter/Login.c b/greeter/Login.c index 5d20a44..010deb2 100644 --- a/greeter/Login.c +++ b/greeter/Login.c @@ -275,14 +275,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) #else |