Avoid harmless warning about using nil in wxMac wxNotebook code
At least with 10.12 SDK, NSTabViewItem initWithIdentifier: parameter isn't annotated as being nullable, so passing "nil" to it triggers a compiler warning. This warning is apparently harmless and the header was fixed in 10.13 SDK, so just suppress it.
This commit is contained in:
@@ -112,10 +112,18 @@
|
|||||||
@implementation WXCTabViewImageItem : NSTabViewItem
|
@implementation WXCTabViewImageItem : NSTabViewItem
|
||||||
- (id)init
|
- (id)init
|
||||||
{
|
{
|
||||||
|
// With 10.12 SDK initWithIdentifier: is declared as taking a non-nil value
|
||||||
|
// and while this was fixed in 10.13 by adding the missing "nullable",
|
||||||
|
// avoid the annoying warning with 10.12 by explicitly disabling it.
|
||||||
|
wxCLANG_WARNING_SUPPRESS(nonnull)
|
||||||
|
|
||||||
if (self = [super initWithIdentifier:nil])
|
if (self = [super initWithIdentifier:nil])
|
||||||
{
|
{
|
||||||
m_image = nil;
|
m_image = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxCLANG_WARNING_RESTORE(nonnull)
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
|
Reference in New Issue
Block a user