Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1922

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.1.2, 3.2.0
    • Build
    • 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]

      Attachments

        Activity

          People

            Unassigned Unassigned
            isidoro.ghezzi isidoro ghezzi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified