Index: src/OFURL.m ================================================================== --- src/OFURL.m +++ src/OFURL.m @@ -594,17 +594,21 @@ * false positive because UTF8String is set to tmp * above and tmp is either NULL or points *after* the * slash for the path. So all we do here is go back to * that slash and restore it. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpragmas" -#pragma GCC diagnostic ignored "-Wunknown-warning-option" -#pragma GCC diagnostic ignored "-Wstringop-overflow" +#if OF_GCC_VERSION >= 402 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wpragmas" +# pragma GCC diagnostic ignored "-Wunknown-warning-option" +# pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif UTF8String--; *UTF8String = '/'; -#pragma GCC diagnostic pop +#if OF_GCC_VERSION >= 402 +# pragma GCC diagnostic pop +#endif _URLEncodedPath = [[OFString alloc] initWithUTF8String: UTF8String]; OFURLVerifyIsEscaped(_URLEncodedPath, Index: src/tls/OFSecureTransportTLSStream.m ================================================================== --- src/tls/OFSecureTransportTLSStream.m +++ src/tls/OFSecureTransportTLSStream.m @@ -72,11 +72,13 @@ /* * Apple deprecated Secure Transport without providing a replacement that can * work with any socket. On top of that, their replacement, Network.framework, * doesn't support STARTTLS at all. */ -#pragma GCC diagnostic ignored "-Wdeprecated" +#if OF_GCC_VERSION >= 402 +# pragma GCC diagnostic ignored "-Wdeprecated" +#endif @implementation OFSecureTransportTLSStream + (void)load { if (OFTLSStreamImplementation == Nil)