Author: matz Date: Wed Apr 2 01:11:10 2008 New Revision: 9333 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9333&view=rev Log: Silence some warnings: a false positive about no-value return, and using the deprecated Dependencies class in the dump function for it (which itself also is deprecated and then doesn't warn anymore). The helixXML() function was completely unused, so removing that too. And NVRAD inherits from Dependencies, hence also is deprecated (unfortunately that doesn't silence the warning for its uses of Dependencies). Modified: trunk/libzypp/zypp/Dependencies.h trunk/libzypp/zypp/NVRAD.h trunk/libzypp/zypp/Resolver.cc trunk/libzypp/zypp/solver/detail/Testcase.cc trunk/libzypp/zypp/solver/detail/Testcase.h Modified: trunk/libzypp/zypp/Dependencies.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Dependencies.h?rev=9333&r1=9332&r2=9333&view=diff ============================================================================== --- trunk/libzypp/zypp/Dependencies.h (original) +++ trunk/libzypp/zypp/Dependencies.h Wed Apr 2 01:11:10 2008 @@ -42,7 +42,7 @@ /////////////////////////////////////////////////////////////////// /** \relates Dependencies Stream output */ - std::ostream & operator<<( std::ostream & str, const Dependencies & obj ); + std::ostream & operator<<( std::ostream & str, const Dependencies & obj ) ZYPP_DEPRECATED; ///////////////////////////////////////////////////////////////// } // namespace zypp Modified: trunk/libzypp/zypp/NVRAD.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/NVRAD.h?rev=9333&r1=9332&r2=9333&view=diff ============================================================================== --- trunk/libzypp/zypp/NVRAD.h (original) +++ trunk/libzypp/zypp/NVRAD.h Wed Apr 2 01:11:10 2008 @@ -29,7 +29,7 @@ * \note Stream output and comaprison operators based on * \ref NVRA. */ - struct NVRAD : public NVRA, public Dependencies + struct ZYPP_DEPRECATED NVRAD : public NVRA, public Dependencies { /** Default ctor */ NVRAD() @@ -69,7 +69,7 @@ /////////////////////////////////////////////////////////////////// /** \relates NVRAD Stream output */ - std::ostream & operator<<( std::ostream & str, const NVRAD & obj ); + std::ostream & operator<<( std::ostream & str, const NVRAD & obj ) ZYPP_DEPRECATED; ///////////////////////////////////////////////////////////////// } // namespace zypp Modified: trunk/libzypp/zypp/Resolver.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Resolver.cc?rev=9333&r1=9332&r2=9333&view=diff ============================================================================== --- trunk/libzypp/zypp/Resolver.cc (original) +++ trunk/libzypp/zypp/Resolver.cc Wed Apr 2 01:11:10 2008 @@ -84,6 +84,7 @@ bool Resolver::onlyRequires() { switch (_pimpl->onlyRequires()) { + default: // to silence compiler warnings about no-value returns case DEFAULT: return ZConfig::instance().solver_onlyRequires(); case TRUE: Modified: trunk/libzypp/zypp/solver/detail/Testcase.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Testcase.cc?rev=9333&r1=9332&r2=9333&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/Testcase.cc (original) +++ trunk/libzypp/zypp/solver/detail/Testcase.cc Wed Apr 2 01:11:10 2008 @@ -172,32 +172,6 @@ return str.str(); } - -template<> -std::string helixXML( const Dependencies &dep ) -{ - stringstream str; - if ( dep[Dep::PROVIDES].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::PROVIDES]), "provides") << endl; - if ( dep[Dep::CONFLICTS].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::CONFLICTS]), "conflicts") << endl; - if ( dep[Dep::OBSOLETES].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::OBSOLETES]), "obsoletes") << endl; - if ( dep[Dep::FRESHENS].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::FRESHENS]), "freshens") << endl; - if ( dep[Dep::REQUIRES].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::REQUIRES]), "requires") << endl; - if ( dep[Dep::RECOMMENDS].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::RECOMMENDS]), "recommends") << endl; - if ( dep[Dep::ENHANCES].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::ENHANCES]), "enhances") << endl; - if ( dep[Dep::SUPPLEMENTS].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::SUPPLEMENTS]), "supplements") << endl; - if ( dep[Dep::SUGGESTS].size() > 0 ) - str << TAB << xml_tag_enclose(helixXML(dep[Dep::SUGGESTS]), "suggests") << endl; - return str.str(); -} - inline string helixXML( const Resolvable::constPtr &obj, Dep deptag_r ) { stringstream out; Modified: trunk/libzypp/zypp/solver/detail/Testcase.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Testcase.h?rev=9333&r1=9332&r2=9333&view=diff ============================================================================== --- trunk/libzypp/zypp/solver/detail/Testcase.h (original) +++ trunk/libzypp/zypp/solver/detail/Testcase.h Wed Apr 2 01:11:10 2008 @@ -55,9 +55,6 @@ std::string helixXML( const CapabilitySet &caps ); template<> -std::string helixXML( const Dependencies &dep ); - -template<> std::string helixXML( const PoolItem &item ); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org