diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-13 14:27:25 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-11-13 14:29:29 -0800 |
commit | fd5e1e9ee9ed359e0ad0dddfbaa4d9c84dcb1810 (patch) | |
tree | 080881287136c949de763815fe9eb1a1167a9fb7 | |
parent | c0601f552aa34af005270f3a65ec0e92421497cb (diff) |
Handle -Wcomma warnings from clang
xwd.c:332:22: warning: possible misuse of comma operator here [-Wcomma]
width += absx, absx = 0;
^
xwd.c:334:23: warning: possible misuse of comma operator here [-Wcomma]
height += absy, absy = 0;
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xwd.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -328,10 +328,14 @@ Window_Dump(Window window, FILE *out) dheight = DisplayHeight(dpy, screen); /* clip to window */ - if (absx < 0) - width += absx, absx = 0; - if (absy < 0) - height += absy, absy = 0; + if (absx < 0) { + width += absx; + absx = 0; + } + if (absy < 0) { + height += absy; + absy = 0; + } if (absx + width > dwidth) width = dwidth - absx; if (absy + height > dheight) |