Warnings on gcc from xercesc/validators/schema/SchemaElementDecl.hpp
--------------------------------------------------------------------
Key: XERCESC-1694
URL: https://issues.apache.org/jira/browse/XERCESC-1694
Project: Xerces-C++
Issue Type: Bug
Components: Validating Parser (Schema) (Xerces 1.5 or up only)
Affects Versions: 2.7.0
Environment: I see this warning on both Linux (x86 and amd64 with
gcc-4.1.1) and Mac (Intel and PPC with gcc 4.0.x)
Reporter: Greg Wolodkin
Priority: Minor
Create a simple .cpp file
#include <xercesc/validators/schema/SchemaElementDecl.hpp
and compile it like so (adding Xerces-C to the include path if necessary with
-I...)
gcc -W -c tt.cpp
I see:
...include/xercesc/validators/schema/SchemaElementDecl.hpp: In member
function 'virtual bool xercesc_2_7::SchemaElementDecl::isGlobalDecl() const':
...include/xercesc/validators/schema/SchemaElementDecl.hpp:508: warning:
comparison between signed and unsigned integer expressions
I fixed it like this:
$ p4 diff -du SchemaElementDecl.hpp
====
//3rdparty/tmw/xerces-c/src/xercesc/validators/schema/SchemaElementDecl.hpp#2 -
/sandbox/greg/Amake/3p/sources/xerces-c/src/xercesc/validators/schema/SchemaElementDecl.hpp
====
@@ -505,7 +505,7 @@
inline bool SchemaElementDecl::isGlobalDecl() const {
- return (fEnclosingScope == Grammar::TOP_LEVEL_SCOPE);
+ return (fEnclosingScope == static_cast<int>(Grammar::TOP_LEVEL_SCOPE));
}
inline SchemaElementDecl*
but you may want to fix it differently by getting all of the types here in
alignment. I didn't see this warning in 2.6.
Thanks for your time!
Greg
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]