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

View file

@ -420,7 +420,7 @@ pty_slave(const char* name)
if (NO == [self launchAndReturnError: &e]) if (NO == [self launchAndReturnError: &e])
{ {
[NSException raise: NSInvalidArgumentException [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 coalesceMask: NSNotificationNoCoalescing
forModes: nil]; forModes: nil];
if (_handler != nil) if (_handler != NULL)
{ {
CALL_BLOCK_NO_ARGS(_handler); CALL_BLOCK_NO_ARGS(_handler);
} }