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 "David Ergo (JIRA)" <xe...@xml.apache.org> on 2005/09/02 11:15:12 UTC

[jira] Created: (XERCESC-1489) Annoying compiler warnings

Annoying compiler warnings
--------------------------

         Key: XERCESC-1489
         URL: http://issues.apache.org/jira/browse/XERCESC-1489
     Project: Xerces-C++
        Type: Bug
  Components: Validating Parser (Schema) (Xerces 1.5 or up only)  
    Versions: 2.7.0    
 Environment: RedHat Linux 7.3, g++ v3.3.3
 Reporter: David Ergo
    Priority: Minor


When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
/usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
   member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
   const':
/usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
   between signed and unsigned integer expressions


-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "James Berry (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12320929 ] 

James Berry commented on XERCESC-1489:
--------------------------------------

David Ergo: changing that one member (fEnclosingScope ) seems like the answer. Can you test that and report whether it solves the problem for you? Are there other places where it needs to change? Most of the other references to scope seem to be unsigned int, which is why those constants got changed to UINT - ... in 2.7 and 3.0.

-jdb

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "James Berry (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12320904 ] 

James Berry commented on XERCESC-1489:
--------------------------------------

The 2.6.0 definition was changed because it was causing major warnings with gcc, due to the negative numbers being incompatible with the type used to represent the scope.

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "David Ergo (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12320878 ] 

David Ergo commented on XERCESC-1489:
-------------------------------------

Just change the definitions of UNKNOWN_SCOPE and TOP_LEVEL_SCOPE from UINT_MAX - 0 and UINT_MAX - 1 to INT_MAX - 0 and INT_MAX - 1
in file src/xercesc/validators/common/Grammar.hpp, at lines 69/70

(They were signed integers in v2.6.0)

David

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12320902 ] 

David Bertoni commented on XERCESC-1489:
----------------------------------------

If anyone is using the persistent grammar facility, this change will break their grammars, so we should make a note of it if we decide to commit this change.  Also, we should only change it in the 3.0 release.

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "David Ergo (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12322641 ] 

David Ergo commented on XERCESC-1489:
-------------------------------------

I tested changing fEnclosingScope to unsigned int and the warnings are gone

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "James Berry (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12320908 ] 

James Berry commented on XERCESC-1489:
--------------------------------------

The problem is that in some places we use an unsigned int to represent "scope", and in others we use an "int".

So we're damned if we do and damned if we don't. I know that there were literally hundreds of warnings from the 2.6 code; are there less now? In which case we should track down and change any of the definitions that define scope as an "int", like fEnclosingScope in SchemeElementDecl.hpp.

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (XERCESC-1489) Annoying compiler warnings

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1489?page=all ]
     
Alberto Massari resolved XERCESC-1489:
--------------------------------------

    Resolution: Fixed

I have changed in the 3.0 branch the data member to be of type "unsigned int", with the necessary getter/setters. Please verify.

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug

>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "David Ergo (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12320903 ] 

David Ergo commented on XERCESC-1489:
-------------------------------------

If the proposed patch breaks grammars then revert to 2.6.0 definition, which produce no warning.
    enum {
         UNKNOWN_SCOPE = -2
       , TOP_LEVEL_SCOPE = -1
    };
 

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "David Ergo (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12320907 ] 

David Ergo commented on XERCESC-1489:
-------------------------------------

Another way to resolve the problem would be to change the fEnclosingScope member variable of SchemaElementDecl from int to unsigned int type :
unsigned int                                fEnclosingScope;
src/xercesc/validators/schema/SchemaElementDecl.hpp, line 381

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1489) Annoying compiler warnings

Posted by "Gareth Reakes (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1489?page=comments#action_12320863 ] 

Gareth Reakes commented on XERCESC-1489:
----------------------------------------

Hi David, if you have the time to sort a patch out for this then I will happily review and commit it.

Gareth

> Annoying compiler warnings
> --------------------------
>
>          Key: XERCESC-1489
>          URL: http://issues.apache.org/jira/browse/XERCESC-1489
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: RedHat Linux 7.3, g++ v3.3.3
>     Reporter: David Ergo
>     Priority: Minor

>
> When compiling a program with #include <xercesc/sax2/XMLReaderFactory.hpp>, like SAX2Count, with warnings enabled (-Wall instead of -w), we get the following compiler warning :
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp: In
>    member function `virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl()
>    const':
> /usr/local/xerces-c/include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning: comparison
>    between signed and unsigned integer expressions

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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