From b68e304a39c4be7ffc1583e8fd17c2fbf5bc810b Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sun, 26 Nov 2023 00:54:06 -0500 Subject: [PATCH] Fix some warnings and suppress some unavoidable ones --- Source/GSSocketStream.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/GSSocketStream.m b/Source/GSSocketStream.m index 0870992207..2bffd9e15a 100644 --- a/Source/GSSocketStream.m +++ b/Source/GSSocketStream.m @@ -1645,6 +1645,11 @@ - (void) _sendEvent: (NSStreamEvent)event } } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-align" + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wincompatible-pointer-types" - (BOOL) _setSocketAddress: (NSString*)address port: (NSInteger)port family: (NSInteger)family @@ -1670,7 +1675,7 @@ - (BOOL) _setSocketAddress: (NSString*)address } else { - [self _setAddress: (struct sockaddr*)&peer]; + [self _setAddress: (struct sockaddr_storage*)&peer]; return YES; } } @@ -2934,6 +2939,11 @@ - (void) acceptWithInputStream: (NSInputStream **)inputStream */ } +#pragma GCC diagnostic pop // cast align + +#pragma GCC diagnostic pop // incompatible pointer types... + + - (void) _dispatch { #if defined(_WIN32)