summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-13 14:27:25 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-13 14:29:29 -0800
commitfd5e1e9ee9ed359e0ad0dddfbaa4d9c84dcb1810 (patch)
tree080881287136c949de763815fe9eb1a1167a9fb7
parentc0601f552aa34af005270f3a65ec0e92421497cb (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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xwd.c b/xwd.c
index 23a734d..758c432 100644
--- a/xwd.c
+++ b/xwd.c
@@ -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)