Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
Mac OS X 10.6.3, g++ 4.2.1, xerces 3.1
Description
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]