You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Norman Samuelson (JIRA)" <xe...@xml.apache.org> on 2004/10/26 18:57:47 UTC

[jira] Created: (XERCESC-1294) Compiler Warnings on IRIX with MIPSpro compiler ver 7.4

Compiler Warnings on IRIX with MIPSpro compiler ver 7.4
-------------------------------------------------------

         Key: XERCESC-1294
         URL: http://issues.apache.org/jira/browse/XERCESC-1294
     Project: Xerces-C++
        Type: Bug
  Components: Build, DOM  
    Versions: 2.6.0    
 Environment: MIPSpro compiler version 7.4
IRIX 6.5
    Reporter: Norman Samuelson
    Priority: Minor


Every file that includes xercesc/dom/DOMDocument.hpp results in a couple of warnings about unused parameters.  The compiler is unhappy that params are defined and never used.  Here is the offending code:
    virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
                                                const XMLCh *publicId,
                                                const XMLCh *systemId)
    {
        return createDocumentType(qName);
    }

I understand that the function is defined this way to maintain compatibility, but warnings are annoying and ignoring them leads to dangerous territory.  One easy way to fix this would be to add the following two lines just before the return statement:

        if (publicId) ; /* unused arg */
        if (systemId) ; /* unused arg */

This may not work on all platforms, as it might cause other warnings, but similar techniques should work.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


[jira] Commented: (XERCESC-1294) Compiler Warnings on IRIX with MIPSpro compiler ver 7.4

Posted by "PeiYong Zhang (JIRA)" <xe...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XERCESC-1294?page=comments#action_54955 ]
     
PeiYong Zhang commented on XERCESC-1294:
----------------------------------------

Norman,

    I've put a patch in cvs, could you please verify? thanks.

Rgds,
PeiYong

> Compiler Warnings on IRIX with MIPSpro compiler ver 7.4
> -------------------------------------------------------
>
>          Key: XERCESC-1294
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-1294
>      Project: Xerces-C++
>         Type: Bug
>   Components: Build, DOM
>     Versions: 2.6.0
>  Environment: MIPSpro compiler version 7.4
> IRIX 6.5
>     Reporter: Norman Samuelson
>     Priority: Minor

>
> Every file that includes xercesc/dom/DOMDocument.hpp results in a couple of warnings about unused parameters.  The compiler is unhappy that params are defined and never used.  Here is the offending code:
>     virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
>                                                 const XMLCh *publicId,
>                                                 const XMLCh *systemId)
>     {
>         return createDocumentType(qName);
>     }
> I understand that the function is defined this way to maintain compatibility, but warnings are annoying and ignoring them leads to dangerous territory.  One easy way to fix this would be to add the following two lines just before the return statement:
>         if (publicId) ; /* unused arg */
>         if (systemId) ; /* unused arg */
> This may not work on all platforms, as it might cause other warnings, but similar techniques should work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


[jira] Commented: (XERCESC-1294) Compiler Warnings on IRIX with MIPSpro compiler ver 7.4

Posted by "Joanne Bogart (JIRA)" <xe...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XERCESC-1294?page=comments#action_54991 ]
     
Joanne Bogart commented on XERCESC-1294:
----------------------------------------

Newer versions of gcc also complains about unused arguments.  There you can eliminate the warnings by changing the implementation (not the declaration in the .h file) to look like

 virtual DOMDocumentType* 
   createDocumentType(const XMLCh*  /* qName */,
                      const XMLCh*  /* publicId */,
                      const XMLCh*  /* systemId */)

That is, just declare the argument types, but don't give named dummy arguments.  For documentation it's often convenient to include them in comments as above.



> Compiler Warnings on IRIX with MIPSpro compiler ver 7.4
> -------------------------------------------------------
>
>          Key: XERCESC-1294
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-1294
>      Project: Xerces-C++
>         Type: Bug
>   Components: Build, DOM
>     Versions: 2.6.0
>  Environment: MIPSpro compiler version 7.4
> IRIX 6.5
>     Reporter: Norman Samuelson
>     Priority: Minor

>
> Every file that includes xercesc/dom/DOMDocument.hpp results in a couple of warnings about unused parameters.  The compiler is unhappy that params are defined and never used.  Here is the offending code:
>     virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
>                                                 const XMLCh *publicId,
>                                                 const XMLCh *systemId)
>     {
>         return createDocumentType(qName);
>     }
> I understand that the function is defined this way to maintain compatibility, but warnings are annoying and ignoring them leads to dangerous territory.  One easy way to fix this would be to add the following two lines just before the return statement:
>         if (publicId) ; /* unused arg */
>         if (systemId) ; /* unused arg */
> This may not work on all platforms, as it might cause other warnings, but similar techniques should work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


[jira] Commented: (XERCESC-1294) Compiler Warnings on IRIX with MIPSpro compiler ver 7.4

Posted by "Norman Samuelson (JIRA)" <xe...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XERCESC-1294?page=comments#action_55045 ]
     
Norman Samuelson commented on XERCESC-1294:
-------------------------------------------

The solution that PeiYong applied is better than my
quick and dirty try at it.  This solves the problem.

Thanks!

- Norm -

> Compiler Warnings on IRIX with MIPSpro compiler ver 7.4
> -------------------------------------------------------
>
>          Key: XERCESC-1294
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-1294
>      Project: Xerces-C++
>         Type: Bug
>   Components: Build, DOM
>     Versions: 2.6.0
>  Environment: MIPSpro compiler version 7.4
> IRIX 6.5
>     Reporter: Norman Samuelson
>     Priority: Minor

>
> Every file that includes xercesc/dom/DOMDocument.hpp results in a couple of warnings about unused parameters.  The compiler is unhappy that params are defined and never used.  Here is the offending code:
>     virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
>                                                 const XMLCh *publicId,
>                                                 const XMLCh *systemId)
>     {
>         return createDocumentType(qName);
>     }
> I understand that the function is defined this way to maintain compatibility, but warnings are annoying and ignoring them leads to dangerous territory.  One easy way to fix this would be to add the following two lines just before the return statement:
>         if (publicId) ; /* unused arg */
>         if (systemId) ; /* unused arg */
> This may not work on all platforms, as it might cause other warnings, but similar techniques should work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


[jira] Commented: (XERCESC-1294) Compiler Warnings on IRIX with MIPSpro compiler ver 7.4

Posted by "Norman Samuelson (JIRA)" <xe...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XERCESC-1294?page=comments#action_54944 ]
     
Norman Samuelson commented on XERCESC-1294:
-------------------------------------------

createDocumentType is the only method that is causing the problem, the warning occurs in any file that includes DOMDocument.hpp.

- Norm -

> Compiler Warnings on IRIX with MIPSpro compiler ver 7.4
> -------------------------------------------------------
>
>          Key: XERCESC-1294
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-1294
>      Project: Xerces-C++
>         Type: Bug
>   Components: Build, DOM
>     Versions: 2.6.0
>  Environment: MIPSpro compiler version 7.4
> IRIX 6.5
>     Reporter: Norman Samuelson
>     Priority: Minor

>
> Every file that includes xercesc/dom/DOMDocument.hpp results in a couple of warnings about unused parameters.  The compiler is unhappy that params are defined and never used.  Here is the offending code:
>     virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
>                                                 const XMLCh *publicId,
>                                                 const XMLCh *systemId)
>     {
>         return createDocumentType(qName);
>     }
> I understand that the function is defined this way to maintain compatibility, but warnings are annoying and ignoring them leads to dangerous territory.  One easy way to fix this would be to add the following two lines just before the return statement:
>         if (publicId) ; /* unused arg */
>         if (systemId) ; /* unused arg */
> This may not work on all platforms, as it might cause other warnings, but similar techniques should work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


[jira] Closed: (XERCESC-1294) Compiler Warnings on IRIX with MIPSpro compiler ver 7.4

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XERCESC-1294?page=history ]
     
Alberto Massari closed XERCESC-1294:
------------------------------------

    Resolution: Fixed

> Compiler Warnings on IRIX with MIPSpro compiler ver 7.4
> -------------------------------------------------------
>
>          Key: XERCESC-1294
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-1294
>      Project: Xerces-C++
>         Type: Bug
>   Components: Build, DOM
>     Versions: 2.6.0
>  Environment: MIPSpro compiler version 7.4
> IRIX 6.5
>     Reporter: Norman Samuelson
>     Priority: Minor

>
> Every file that includes xercesc/dom/DOMDocument.hpp results in a couple of warnings about unused parameters.  The compiler is unhappy that params are defined and never used.  Here is the offending code:
>     virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
>                                                 const XMLCh *publicId,
>                                                 const XMLCh *systemId)
>     {
>         return createDocumentType(qName);
>     }
> I understand that the function is defined this way to maintain compatibility, but warnings are annoying and ignoring them leads to dangerous territory.  One easy way to fix this would be to add the following two lines just before the return statement:
>         if (publicId) ; /* unused arg */
>         if (systemId) ; /* unused arg */
> This may not work on all platforms, as it might cause other warnings, but similar techniques should work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


[jira] Commented: (XERCESC-1294) Compiler Warnings on IRIX with MIPSpro compiler ver 7.4

Posted by "PeiYong Zhang (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1294?page=comments#action_54862 ]
     
PeiYong Zhang commented on XERCESC-1294:
----------------------------------------

Norman,

    Can you post the list of offending methods? thanks.

Rgds,
PeiYong

> Compiler Warnings on IRIX with MIPSpro compiler ver 7.4
> -------------------------------------------------------
>
>          Key: XERCESC-1294
>          URL: http://issues.apache.org/jira/browse/XERCESC-1294
>      Project: Xerces-C++
>         Type: Bug
>   Components: Build, DOM
>     Versions: 2.6.0
>  Environment: MIPSpro compiler version 7.4
> IRIX 6.5
>     Reporter: Norman Samuelson
>     Priority: Minor

>
> Every file that includes xercesc/dom/DOMDocument.hpp results in a couple of warnings about unused parameters.  The compiler is unhappy that params are defined and never used.  Here is the offending code:
>     virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
>                                                 const XMLCh *publicId,
>                                                 const XMLCh *systemId)
>     {
>         return createDocumentType(qName);
>     }
> I understand that the function is defined this way to maintain compatibility, but warnings are annoying and ignoring them leads to dangerous territory.  One easy way to fix this would be to add the following two lines just before the return statement:
>         if (publicId) ; /* unused arg */
>         if (systemId) ; /* unused arg */
> This may not work on all platforms, as it might cause other warnings, but similar techniques should work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org