From 91f1119528b57f94d178f0cfb12efafd0c90bbc9 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Wed, 8 May 2019 21:15:08 -0400 Subject: fixes cppcheck "style" warnings (mostly variable-scope) Signed-off-by: Thomas E. Dickey --- src/SetSens.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/SetSens.c') diff --git a/src/SetSens.c b/src/SetSens.c index 9a2e6b6..04d3f3a 100644 --- a/src/SetSens.c +++ b/src/SetSens.c @@ -82,9 +82,7 @@ static void SetAncestorSensitive( register Widget widget, Boolean ancestor_sensitive) { - Arg args[1]; - register Cardinal i; - register WidgetList children; + Arg args[1]; if (widget->core.ancestor_sensitive == ancestor_sensitive) return; @@ -96,6 +94,9 @@ static void SetAncestorSensitive( ancestor_sensitive is already FALSE */ if (widget->core.sensitive && XtIsComposite(widget)) { + Cardinal i; + WidgetList children; + children = ((CompositeWidget) widget)->composite.children; for (i=0; i < ((CompositeWidget)widget)->composite.num_children; i++) { SetAncestorSensitive (children[i], ancestor_sensitive); @@ -109,8 +110,6 @@ void XtSetSensitive( _XtBoolean sensitive) { Arg args[1]; - register Cardinal i; - register WidgetList children; WIDGET_TO_APPCON(widget); LOCK_APP(app); @@ -127,6 +126,9 @@ void XtSetSensitive( ancestor_sensitive is already FALSE */ if (widget->core.ancestor_sensitive && XtIsComposite (widget)) { + Cardinal i; + WidgetList children; + children = ((CompositeWidget) widget)->composite.children; for (i = 0; i < ((CompositeWidget)widget)->composite.num_children; i++){ SetAncestorSensitive (children[i], (Boolean) sensitive); -- cgit v1.2.3