suppress various warnings

This commit is contained in:
Riccardo Mottola 2023-09-18 23:08:41 +02:00
parent d97c84b9ed
commit 339fb7a131
2 changed files with 30 additions and 26 deletions

View file

@ -1266,18 +1266,20 @@ static Class runLoopClass;
cLength = 0;
#if defined(HAVE_GNUTLS)
NSDictionary *opts = [p clientOptionsForTLS];
DESTROY(session);
if (opts)
{
session = [[GSTLSSession alloc] initWithOptions: opts
direction: YES // as client
transport: self
push: GSTLSHandlePush
pull: GSTLSHandlePull];
NSDebugMLLog(@"GSTcpHandle",
@"%@ is connecting using %@", self, session);
}
{
NSDictionary *opts = [p clientOptionsForTLS];
DESTROY(session);
if (opts)
{
session = [[GSTLSSession alloc] initWithOptions: opts
direction: YES // as client
transport: self
push: GSTLSHandlePush
pull: GSTLSHandlePull];
NSDebugMLLog(@"GSTcpHandle",
@"%@ is connecting using %@", self, session);
}
}
#endif
}
}
@ -2425,18 +2427,20 @@ static Class tcpPortClass;
ASSIGN(handle->defaultAddress, GSPrivateSockaddrHost(&sockAddr));
[handle setState: GS_H_ACCEPT];
#if defined(HAVE_GNUTLS)
NSDictionary *o;
if ((o = [self serverOptionsForTLS]) != nil)
{
handle->session = [[GSTLSSession alloc]
initWithOptions: o
direction: NO // as server
transport: handle
push: GSTLSHandlePush
pull: GSTLSHandlePull];
NSDebugMLLog(@"GSTcpHandle",
@"%@ is accepting using %@", handle, handle->session);
}
{
NSDictionary *o;
if ((o = [self serverOptionsForTLS]) != nil)
{
handle->session = [[GSTLSSession alloc]
initWithOptions: o
direction: NO // as server
transport: handle
push: GSTLSHandlePush
pull: GSTLSHandlePull];
NSDebugMLLog(@"GSTcpHandle",
@"%@ is accepting using %@", handle, handle->session);
}
}
#endif
[self addHandle: handle forSend: NO];
}

View file

@ -420,7 +420,7 @@ pty_slave(const char* name)
if (NO == [self launchAndReturnError: &e])
{
[NSException raise: NSInvalidArgumentException
format: @"%@", e ? e : @"Unable to launch"];
format: @"%@", e ? [e description] : @"Unable to launch"];
}
}
@ -969,7 +969,7 @@ pty_slave(const char* name)
coalesceMask: NSNotificationNoCoalescing
forModes: nil];
if (_handler != nil)
if (_handler != NULL)
{
CALL_BLOCK_NO_ARGS(_handler);
}