mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Fix compilation error. Added cast to (id) for nil when working with GSIArrayItem and GSIArray. This issue wasn't caught by CI since gui was not recompiled after base was altered.
This commit is contained in:
parent
a047b10a51
commit
8fa489282b
2 changed files with 13 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
2021-11-15 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSView.m: Add cast to id in case nil is not "id". This
|
||||
is the same fix that was done by Frederick Seiffert on base.
|
||||
|
||||
2021-10-27 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSPopUpButtonCell.m
|
||||
|
|
|
@ -695,7 +695,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
}
|
||||
if (GSIArrayItemAtIndex(nKV(tmp), 0).obj == self)
|
||||
{
|
||||
GSIArraySetItemAtIndex(nKV(tmp), (GSIArrayItem)nil, 0);
|
||||
GSIArraySetItemAtIndex(nKV(tmp), (GSIArrayItem)(id)nil, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
}
|
||||
if (GSIArrayItemAtIndex(pKV(tmp), 0).obj == self)
|
||||
{
|
||||
GSIArraySetItemAtIndex(pKV(tmp), (GSIArrayItem)nil, 0);
|
||||
GSIArraySetItemAtIndex(pKV(tmp), (GSIArrayItem)(id)nil, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3646,13 +3646,13 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
|||
}
|
||||
if (GSIArrayItemAtIndex(pKV(tmp), 0).obj == self)
|
||||
{
|
||||
GSIArraySetItemAtIndex(pKV(tmp), (GSIArrayItem)nil, 0);
|
||||
GSIArraySetItemAtIndex(pKV(tmp), (GSIArrayItem)(id)nil, 0);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Clear link to the next key view.
|
||||
*/
|
||||
GSIArraySetItemAtIndex(nKV(self), (GSIArrayItem)nil, 0);
|
||||
GSIArraySetItemAtIndex(nKV(self), (GSIArrayItem)(id)nil, 0);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -3666,7 +3666,7 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
|||
*/
|
||||
_nextKeyView = NSZoneMalloc(NSDefaultMallocZone(), sizeof(GSIArray_t));
|
||||
GSIArrayInitWithZoneAndCapacity(nKV(self), NSDefaultMallocZone(), 1);
|
||||
GSIArrayAddItem(nKV(self), (GSIArrayItem)nil);
|
||||
GSIArrayAddItem(nKV(self), (GSIArrayItem)(id)nil);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3686,7 +3686,7 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
|||
*/
|
||||
aView->_previousKeyView = NSZoneMalloc(NSDefaultMallocZone(), sizeof(GSIArray_t));
|
||||
GSIArrayInitWithZoneAndCapacity(pKV(aView), NSDefaultMallocZone(), 1);
|
||||
GSIArrayAddItem(pKV(aView), (GSIArrayItem)nil);
|
||||
GSIArrayAddItem(pKV(aView), (GSIArrayItem)(id)nil);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3709,7 +3709,7 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
|||
*/
|
||||
if (GSIArrayItemAtIndex(nKV(tmp), 0).obj == aView)
|
||||
{
|
||||
GSIArrayInsertItem(pKV(aView), (GSIArrayItem)nil, 0);
|
||||
GSIArrayInsertItem(pKV(aView), (GSIArrayItem)(id)nil, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3734,7 +3734,7 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
|||
}
|
||||
if (GSIArrayItemAtIndex(pKV(tmp), 0).obj == self)
|
||||
{
|
||||
GSIArraySetItemAtIndex(pKV(tmp), (GSIArrayItem)nil, 0);
|
||||
GSIArraySetItemAtIndex(pKV(tmp), (GSIArrayItem)(id)nil, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue