summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-05-08 09:52:49 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-05-08 09:52:49 -0700
commit97085ba43fcd752271a9356c435d28b95211644d (patch)
tree1340e0e67da99dc302a9c901b16e578cddb104bb
parent4a148f172d83d5e7f0ace6f28d4b8894b5e10442 (diff)
Dead code removal
xwd.c:298:5: warning: Value stored to 'bw' is never read bw = 0; ^ ~ Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--xwd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/xwd.c b/xwd.c
index 0d57d75..9ca67bc 100644
--- a/xwd.c
+++ b/xwd.c
@@ -247,7 +247,6 @@ Window_Dump(Window window, FILE *out)
int absx, absy, x, y;
unsigned width, height;
int dwidth, dheight;
- int bw;
Window dummywin;
XWDFileHeader header;
XWDColor xwdcolor;
@@ -295,14 +294,12 @@ Window_Dump(Window window, FILE *out)
win_info.y = absy;
width = win_info.width;
height = win_info.height;
- bw = 0;
if (!nobdrs) {
absx -= win_info.border_width;
absy -= win_info.border_width;
- bw = win_info.border_width;
- width += (2 * bw);
- height += (2 * bw);
+ width += (2 * win_info.border_width);
+ height += (2 * win_info.border_width);
}
dwidth = DisplayWidth (dpy, screen);
dheight = DisplayHeight (dpy, screen);