MacOSUnicodeConverter.cpp: ISO C++ forbids comparison between pointer of type 
'void *' and pointer-to-function
--------------------------------------------------------------------------------------------------------------

                 Key: XERCESC-1922
                 URL: https://issues.apache.org/jira/browse/XERCESC-1922
             Project: Xerces-C++
          Issue Type: Improvement
          Components: Build
         Environment: Mac OS X 10.6.3, g++ 4.2.1, xerces 3.1
            Reporter: isidoro ghezzi
            Priority: Minor
             Fix For: 3.1.0


Compiling with $ g++ --version
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)
having -Wall -Wextra -Wconversion -ansi -pedantic flags the result is:
xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp: In 
static member function 'static bool 
xercesc_3_1::MacOSUnicodeConverter::IsMacOSUnicodeConverterSupported()':
xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp:461: 
error: ISO C++ forbids comparison between pointer of type 'void *' and 
pointer-to-function
xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp:462: 
error: ISO C++ forbids comparison between pointer of type 'void *' and 
pointer-to-function

to avoid that, i suggest to change:
[code]
bool
MacOSUnicodeConverter::IsMacOSUnicodeConverterSupported(void)
{
    return UpgradeScriptInfoToTextEncoding != (void*)NULL
        && CreateTextToUnicodeInfoByEncoding != (void*)NULL
        ;
}
[/code]
to:

[code]
bool
MacOSUnicodeConverter::IsMacOSUnicodeConverterSupported(void)
{
    return (0L != UpgradeScriptInfoToTextEncoding)
        && (0L != CreateTextToUnicodeInfoByEncoding)
        ;
}
[/code]




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to