diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-05-16 20:53:42 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-05-18 06:42:03 -0400 |
commit | 1f0e3238352a497a59a36e0b8a5b4723c634b2e1 (patch) | |
tree | d49a598905cf10e28ff7d21a627e2f90a6e79ada /src/Geometry.c | |
parent | fb78a7c881adbe46f1f8c6e8e429bc8963c9b3e8 (diff) |
fix most clang --analyze warnings about null-pointers
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Geometry.c')
-rw-r--r-- | src/Geometry.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/Geometry.c b/src/Geometry.c index b8d3606..992141e 100644 --- a/src/Geometry.c +++ b/src/Geometry.c @@ -116,7 +116,9 @@ _XtMakeGeometryRequest ( XtGeometryHandler manager = (XtGeometryHandler) NULL; XtGeometryResult returnCode; Widget parent = widget->core.parent; - Boolean managed, parentRealized, rgm = False; + Boolean managed; + Boolean parentRealized = False; + Boolean rgm = False; XtConfigureHookDataRec req; Widget hookobj; @@ -163,21 +165,22 @@ _XtMakeGeometryRequest ( parentRealized = TRUE; UNLOCK_PROCESS; } else /* not shell */ { - if (parent == NULL) + if (parent == NULL) { XtAppErrorMsg(XtWidgetToApplicationContext(widget), "invalidParent","xtMakeGeometryRequest", XtCXtToolkitError, "non-shell has no parent in XtMakeGeometryRequest", NULL, NULL); - - managed = XtIsManaged(widget); - parentRealized = XtIsRealized(parent); - if (XtIsComposite(parent)) - { - LOCK_PROCESS; - manager = ((CompositeWidgetClass) (parent->core.widget_class)) - ->composite_class.geometry_manager; - UNLOCK_PROCESS; + } else { + managed = XtIsManaged(widget); + parentRealized = XtIsRealized(parent); + if (XtIsComposite(parent)) + { + LOCK_PROCESS; + manager = ((CompositeWidgetClass) (parent->core.widget_class)) + ->composite_class.geometry_manager; + UNLOCK_PROCESS; + } } } |