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

base class warning in SAXException.hpp copy constructor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • SAX/SAX2
    • None
    • Operating System: Linux
      Platform: PC
    • 27196

    Description

      I have been getting multiple copies of this warning:

      include/xercesc/sax/SAXException.hpp: In copy constructor
      `xercesc_2_5::SAXException::SAXException(const xercesc_2_5::SAXException&)':
      include/xercesc/sax/SAXException.hpp:195: warning: base class `class
      xercesc_2_5::XMemory' should be explicitly initialized in the copy constructor

      I have to fix the code in SAXException.hpp by changing this:

      SAXException(const SAXException& toCopy) :

      fMsg(XMLString::replicate(toCopy.fMsg, toCopy.fMemoryManager))
      , fMemoryManager(toCopy.fMemoryManager)
      {
      }

      into this:

      SAXException(const SAXException& toCopy) : XMemory(),

      fMsg(XMLString::replicate(toCopy.fMsg, toCopy.fMemoryManager))
      , fMemoryManager(toCopy.fMemoryManager)
      {
      }

      once XMemory() is declared as a base class, all warnings are gone. I've seen
      this in 2.5.0 as well. Below are the compiler flags that I have set which
      should help you recreate this bug:

      -g3 -I. -I./include -isystem ./libs/crystalize/Linux/include -I. -
      I./include -isystem ./libs/crystalize/Linux/include -D_linux_ -D_x86_ -
      DOMNI -DOMNI_VERSION="4" -I./idl -D_REENTRANT -I./libs/Database -
      I./libs/Database/libs/xerces/Linux/include isystem ./libs/sybase/sybase
      12.5.1/Linux/include I./libs/xerces/Linux/include -Wall -W -pedantic -Wno
      long-long Wpointer-arith -Wcast-qual -Wwrite-strings -Wconversion -Wstrict
      prototypes -Wmissing-prototypes -Woverloaded-virtual -Wchar-subscripts -
      Wparentheses Wpointer-arith -Winline -Wnon-virtual-dtor -Wreorder -fno-gnu
      keywords -Wctor-dtor-privacy -Wno-format-y2k -Wdeprecated -Wformat -Wmultichar -
      Wno-float-equal Wdisabled-optimization -Wswitch -Wpointer-arith -pipe -Wno
      cast-qual Wno-unused-parameter -Wno-overloaded-virtual -fsigned-char -fmessage
      length=0 -DSIZE_MAX=4294967295U -DCORBA_ENUMS -D_FILE_OFFSET_BITS=64 -
      D_linux_ -D_x86_ -DOMNI -DOMNI_VERSION="4" -I./idl -D_REENTRANT -
      I./libs/utilities/include -I./libs/AST_Common -I./libs/AST_Common/AST/enums -
      I./libs/Database -I./libs/Database/libs/boost/Linux -
      I./libs/Database/libs/omni/Linux/include I./libs/Database/libs/sybase/sybase
      12.5.1/Linux/include -I./libs/Database/libs/xerces/Linux/include -
      isystem ./libs/sybase/sybase-12.5.1/Linux/include -
      I./libs/xerces/Linux/include -Wall -W -pedantic -Wno-long-long -Wpointer-arith -
      Wcast-qual Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing
      prototypes Woverloaded-virtual -Wchar-subscripts -Wparentheses -Wpointer
      arith Winline -Wnon-virtual-dtor -Wreorder -fno-gnu-keywords -Wctor-dtor
      privacy -Wno-format-y2k -Wdeprecated -Wformat -Wmultichar -Wno-float-equal -
      Wdisabled-optimization Wswitch -Wpointer-arith -pipe -Wno-cast-qual -Wno
      unused-parameter -Wno-overloaded-virtual -fsigned-char -fmessage-length=0 -
      DSIZE_MAX=4294967295U -DCORBA_ENUMS -D_FILE_OFFSET_BITS=64

      Let me know if you need more information. Thank you.

      -Vrajesh

      Attachments

        Activity

          People

            Unassigned Unassigned
            vrajeshis@yahoo.com Vrajesh Patel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: