Fixed additional warnings.
authorScott Cantor <cantor.2@osu.edu>
Fri, 24 Mar 2006 21:28:01 +0000 (21:28 +0000)
committerScott Cantor <cantor.2@osu.edu>
Fri, 24 Mar 2006 21:28:01 +0000 (21:28 +0000)
adfs/handlers.cpp
apache/mod_apache.cpp
xmlproviders/XMLMetadata.cpp

index ec9c5eb..3a141f5 100644 (file)
@@ -241,7 +241,7 @@ const IPropertySet* SessionInitiator::getCompatibleACS(const IApplication* app,
     
     // If not, iterate by profile.
     for (vector<ShibProfile>::const_iterator i=profiles.begin(); i!=profiles.end(); i++) {
-        for (unsigned short j=0; j<=65535; j++) {
+        for (unsigned int j=0; j<=65535; j++) {
             ACS=app->getAssertionConsumerServiceByIndex(j);
             if (!ACS && j)
                 break;  // we're past 0 and didn't get a hit, so we'll bail
@@ -271,6 +271,8 @@ const IPropertySet* SessionInitiator::getCompatibleACS(const IApplication* app,
                         if (version.second==0 && !XMLString::compareString(binding.second,SAMLBrowserProfile::BROWSER_ARTIFACT))
                             return ACS;
                         break;
+                    default:
+                        break;
                 }
             }
         }
@@ -306,7 +308,7 @@ pair<bool,void*> SessionInitiator::ShibAuthnRequest(
     if (shire) ACSloc+=shire->getString("Location").second;
     
     char timebuf[16];
-    sprintf(timebuf,"%u",time(NULL));
+    sprintf(timebuf,"%lu",time(NULL));
     string req=string(dest) + "?shire=" + CgiParse::url_encode(ACSloc.c_str()) + "&time=" + timebuf;
 
     // How should the resource value be preserved?
index 7ba7e60..f8ebc7c 100644 (file)
@@ -481,7 +481,7 @@ IPlugIn* ApacheRequestMapFactory(const DOMElement* e)
     return new ApacheRequestMapper(e);
 }
 
-ApacheRequestMapper::ApacheRequestMapper(const DOMElement* e) : m_mapper(NULL), m_htaccess(NULL), m_staKey(NULL), m_propsKey(NULL)
+ApacheRequestMapper::ApacheRequestMapper(const DOMElement* e) : m_mapper(NULL), m_staKey(NULL), m_propsKey(NULL), m_htaccess(NULL)
 {
     IPlugIn* p=SAMLConfig::getConfig().getPlugMgr().newPlugin(shibtarget::XML::XMLRequestMapType,e);
     m_mapper=dynamic_cast<IRequestMapper*>(p);
@@ -750,8 +750,8 @@ bool htAccessControl::authorized(
                     }
                     
                     string vals_str(vals);
-                    int j = 0;
-                    for (int i = 0;  i < vals_str.length();  i++) {
+                    unsigned int j = 0;
+                    for (unsigned int i = 0;  i < vals_str.length();  i++) {
                         if (vals_str.at(i) == ';') {
                             if (i == 0) {
                                 st->log(ShibTarget::LogLevelError, string("htAccessControl plugin found invalid header encoding (") +
index 046f3d3..b628aee 100644 (file)
@@ -828,7 +828,7 @@ XMLMetadataImpl::IDPRole::IDPRole(const EntityDescriptor* provider, time_t valid
                 src=saml::XML::getNextSiblingElement(src,::XML::SAML2ASSERT_NS,L(AttributeValue));
                 DOMElement* val=e->getOwnerDocument()->createElementNS(saml::XML::SAML_NS,L(AttributeValue));
                 DOMNamedNodeMap* attrs = src->getAttributes();
-                for (int j=0; j<attrs->getLength(); j++)
+                for (XMLSize_t j=0; j<attrs->getLength(); j++)
                     val->setAttributeNodeNS(static_cast<DOMAttr*>(e->getOwnerDocument()->importNode(attrs->item(j),true)));
                 while (src->hasChildNodes())
                     val->appendChild(src->getFirstChild());
@@ -909,7 +909,7 @@ XMLMetadataImpl::AARole::AARole(const EntityDescriptor* provider, time_t validUn
                 src=saml::XML::getNextSiblingElement(src,::XML::SAML2ASSERT_NS,L(AttributeValue));
                 DOMElement* val=e->getOwnerDocument()->createElementNS(saml::XML::SAML_NS,L(AttributeValue));
                 DOMNamedNodeMap* attrs = src->getAttributes();
-                for (int j=0; j<attrs->getLength(); j++)
+                for (XMLSize_t j=0; j<attrs->getLength(); j++)
                     val->setAttributeNodeNS(static_cast<DOMAttr*>(e->getOwnerDocument()->importNode(attrs->item(j),true)));
                 while (src->hasChildNodes())
                     val->appendChild(src->getFirstChild());
@@ -1086,7 +1086,7 @@ XMLMetadataImpl::EntityDescriptor::~EntityDescriptor()
 
 XMLMetadataImpl::EntitiesDescriptor::EntitiesDescriptor(
     const DOMElement* e, XMLMetadataImpl* wrapper, time_t validUntil, const IEntitiesDescriptor* parent
-    ) : m_root(e), m_name(e->getAttributeNS(NULL,SHIB_L(Name))), m_parent(parent), m_validUntil(validUntil)
+    ) : m_root(e),  m_parent(parent), m_name(e->getAttributeNS(NULL,SHIB_L(Name))), m_validUntil(validUntil)
 {
     // Check the root element namespace. If SAML2, assume it's the std schema.
     if (!XMLString::compareString(e->getNamespaceURI(),::XML::SAML2META_NS)) {
@@ -1223,7 +1223,7 @@ XMLMetadata::XMLMetadata(const DOMElement* e) : ReloadableXMLFile(e), m_exclusio
         // If there was no explicit enablement, build a set of exclusions.
         if (m_exclusions) {
             nlist=e->getElementsByTagName(SHIB_L(Exclude));
-            for (int j=0; nlist && j<nlist->getLength(); j++) {
+            for (XMLSize_t j=0; nlist && j<nlist->getLength(); j++) {
                 if (nlist->item(j)->hasChildNodes()) {
                     auto_ptr_char temp(nlist->item(j)->getFirstChild()->getNodeValue());
                     if (temp.get())
@@ -1322,7 +1322,7 @@ bool XMLMetadata::verifySignature(DOMDocument* doc, const DOMElement* parent, bo
                 if (!URI || !*URI || (*URI==chPound &&
                         !XMLString::compareString(&URI[1],static_cast<DOMElement*>(sigNode->getParentNode())->getAttributeNS(NULL,ID)))) {
                     DSIGTransformList* tlist=ref->getTransforms();
-                    for (int i=0; tlist && i<tlist->getSize(); i++) {
+                    for (unsigned int i=0; tlist && i<tlist->getSize(); i++) {
                         if (tlist->item(i)->getTransformType()==TRANSFORM_ENVELOPED_SIGNATURE)
                             valid=true;
                         else if (tlist->item(i)->getTransformType()!=TRANSFORM_EXC_C14N &&