Avoid compiler warnings

This commit is contained in:
Richard Frith-Macdonald 2018-02-11 09:46:07 +00:00
parent 64732ce825
commit f72708742a
2 changed files with 9 additions and 6 deletions

View file

@ -2848,7 +2848,7 @@ GSPrivateEncodingName(NSStringEncoding encoding)
{
struct _strenc_ *encInfo;
if ((encInfo = EntrySupported(encoding)) == NO)
if ((encInfo = EntrySupported(encoding)) == NULL)
{
return @"Unknown encoding";
}
@ -2860,7 +2860,7 @@ GSPrivateIsByteEncoding(NSStringEncoding encoding)
{
struct _strenc_ *encInfo;
if ((encInfo = EntrySupported(encoding)) == NO)
if ((encInfo = EntrySupported(encoding)) == NULL)
{
return NO;
}

View file

@ -515,10 +515,13 @@ static const unichar byteOrderMarkSwapped = 0xFFFE;
Apparently GNU libc 2.xx needs this to be 0 also, along with Linux
libc versions 5.2.xx and higher (including libc6, which is just GNU
libc). -chung */
#define PRINTF_ATSIGN_VA_LIST \
(defined(_LINUX_C_LIB_VERSION_MINOR) \
&& _LINUX_C_LIB_VERSION_MAJOR <= 5 \
&& _LINUX_C_LIB_VERSION_MINOR < 2)
#if defined(_LINUX_C_LIB_VERSION_MINOR) \
&& _LINUX_C_LIB_VERSION_MAJOR <= 5 \
&& _LINUX_C_LIB_VERSION_MINOR < 2
#define PRINTF_ATSIGN_VA_LIST 1
#else
#define PRINTF_ATSIGN_VA_LIST 0
#endif
#if ! PRINTF_ATSIGN_VA_LIST
static int