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

PSVIAttributeList::getPSVIAttributeToFill not const correct

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.0
    • 3.0.0
    • DOM
    • None
    • MacOSX, Linux GCC 4.1

    Description

      I get warnings in this inline method (getPSVIAttributeToFill) about casts from const XMLCh * to XMLCh *.

      For example:
      Line 185, PSVIAttributeList.hpp : rAttrNameList->addElement((XMLCh *)attrName);

      The real problem is that the addElement method takes a non-const XMLCh *, so getPSVIAttributeToFill has to cast its const argument to non-const or this would be compiler error.

      I don't know if anyone is committed to fixing up const-correctness in Xerces-C++ – if it wasn't written in a const-paranoid manner, this would be a pretty large job. But at a minimum, using const_cast<XMLCh *>() instead of C-style casting would shut GCC4 up.

      Attachments

        Activity

          People

            amassari Alberto Massari
            chaircrusher kent williams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: