summaryrefslogtreecommitdiff
path: root/src/Composite.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-05-16 20:53:42 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-05-18 06:42:03 -0400
commit1f0e3238352a497a59a36e0b8a5b4723c634b2e1 (patch)
treed49a598905cf10e28ff7d21a627e2f90a6e79ada /src/Composite.c
parentfb78a7c881adbe46f1f8c6e8e429bc8963c9b3e8 (diff)
fix most clang --analyze warnings about null-pointers
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Composite.c')
-rw-r--r--src/Composite.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/Composite.c b/src/Composite.c
index 5188514..108645d 100644
--- a/src/Composite.c
+++ b/src/Composite.c
@@ -184,34 +184,32 @@ static void CompositeClassPartInitialize(
wcPtr = (CompositePartPtr)
&(((CompositeWidgetClass)myWidgetClass)->composite_class);
- if (myWidgetClass != compositeWidgetClass)
+ if (myWidgetClass != compositeWidgetClass) {
/* don't compute possible bogus pointer */
superPtr = (CompositePartPtr)&(((CompositeWidgetClass)myWidgetClass
->core_class.superclass)->composite_class);
- /* We don't need to check for null super since we'll get to composite
- eventually, and it had better define them! */
-
- LOCK_PROCESS;
- if (wcPtr->geometry_manager == XtInheritGeometryManager) {
- wcPtr->geometry_manager =
- superPtr->geometry_manager;
- }
+ LOCK_PROCESS;
+ if (wcPtr->geometry_manager == XtInheritGeometryManager) {
+ wcPtr->geometry_manager =
+ superPtr->geometry_manager;
+ }
- if (wcPtr->change_managed == XtInheritChangeManaged) {
- wcPtr->change_managed =
- superPtr->change_managed;
- InheritAllowsChangeManagedSet(myWidgetClass);
- }
+ if (wcPtr->change_managed == XtInheritChangeManaged) {
+ wcPtr->change_managed =
+ superPtr->change_managed;
+ InheritAllowsChangeManagedSet(myWidgetClass);
+ }
- if (wcPtr->insert_child == XtInheritInsertChild) {
- wcPtr->insert_child = superPtr->insert_child;
- }
+ if (wcPtr->insert_child == XtInheritInsertChild) {
+ wcPtr->insert_child = superPtr->insert_child;
+ }
- if (wcPtr->delete_child == XtInheritDeleteChild) {
- wcPtr->delete_child = superPtr->delete_child;
+ if (wcPtr->delete_child == XtInheritDeleteChild) {
+ wcPtr->delete_child = superPtr->delete_child;
+ }
+ UNLOCK_PROCESS;
}
- UNLOCK_PROCESS;
}
static void CompositeDestroy(