summaryrefslogtreecommitdiff
path: root/src/Viewport.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2012-01-22 11:58:09 -0800
committerJeremy Huddleston <jeremyhu@apple.com>2012-01-22 12:01:18 -0800
commit702e4ff9f5fbfae4aecba09f8c735dc97bac1b59 (patch)
tree01f404606c1b02f79d3d156d039eac40abf84ec9 /src/Viewport.c
parentd31153b30abd26c3f65e19d126ce4a3542cf14c0 (diff)
Cleanup shadow declarations
Box.c:265:10: warning: declaration shadows a local variable [-Wshadow] int i = bbw->composite.num_children; ^ Box.c:166:15: note: previous declaration is here Cardinal i; ^ 1 warning generated. Form.c:809:9: warning: declaration shadows a local variable [-Wshadow] Widget w = *childP; ^ Form.c:793:24: note: previous declaration is here XawFormDoLayout(Widget w, ^ 1 warning generated. Viewport.c:627:24: warning: declaration shadows a local variable [-Wshadow] if (!needshoriz) CheckHoriz(); ^ Viewport.c:605:14: note: expanded from macro 'CheckHoriz' Widget bar = w->viewport.horiz_bar; \ ^ Viewport.c:620:14: note: previous declaration is here Widget bar = w->viewport.vert_bar; ^ 1 warning generated. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src/Viewport.c')
-rw-r--r--src/Viewport.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Viewport.c b/src/Viewport.c
index abb8961..a37a9a1 100644
--- a/src/Viewport.c
+++ b/src/Viewport.c
@@ -602,12 +602,12 @@ ComputeLayout(Widget widget, Boolean query, Boolean destroy_scrollbars)
if (w->viewport.allowhoriz && \
(int)preferred.width > clip_width + 2 * sw) { \
if (!needshoriz) { \
- Widget bar = w->viewport.horiz_bar; \
+ Widget horiz_bar = w->viewport.horiz_bar; \
needshoriz = True; \
- if (bar == (Widget)NULL) \
- bar = CreateScrollbar(w, True); \
- clip_height -= bar->core.height + \
- bar->core.border_width + pad; \
+ if (horiz_bar == (Widget)NULL) \
+ horiz_bar = CreateScrollbar(w, True); \
+ clip_height -= horiz_bar->core.height + \
+ horiz_bar->core.border_width + pad; \
if (clip_height < 1) clip_height = 1; \
} \
intended.width = preferred.width; \
@@ -617,12 +617,12 @@ ComputeLayout(Widget widget, Boolean query, Boolean destroy_scrollbars)
if (w->viewport.allowvert &&
(int)preferred.height > clip_height + 2 * sw) {
if (!needsvert) {
- Widget bar = w->viewport.vert_bar;
+ Widget vert_bar = w->viewport.vert_bar;
needsvert = True;
- if (bar == (Widget)NULL)
- bar = CreateScrollbar(w, False);
- clip_width -= bar->core.width +
- bar->core.border_width + pad;
+ if (vert_bar == (Widget)NULL)
+ vert_bar = CreateScrollbar(w, False);
+ clip_width -= vert_bar->core.width +
+ vert_bar->core.border_width + pad;
if (clip_width < 1) clip_width = 1;
if (!needshoriz) CheckHoriz();
}