From 39c151f4de7812e46006e40d716207a0761e51bb Mon Sep 17 00:00:00 2001 From: Jan Kupec Date: Wed, 26 Mar 2008 09:50:25 +0000 Subject: [PATCH] - fix some compiler warnings --- src/output/OutXML.cc | 2 +- src/zypper-info.cc | 8 +++----- src/zypper-misc.cc | 6 +++--- src/zypper-repo-callbacks.h | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/output/OutXML.cc b/src/output/OutXML.cc index 517d61c..cb999d6 100644 --- a/src/output/OutXML.cc +++ b/src/output/OutXML.cc @@ -193,7 +193,7 @@ void OutXML::prompt(PromptId id, cout << "" << endl; cout << xml_encode(prompt); - int i = 0; + unsigned int i = 0; for (PromptOptions::OptionList::const_iterator it = poptions.options().begin(); it != poptions.options().end(); ++it, i++) { diff --git a/src/zypper-info.cc b/src/zypper-info.cc index ff164be..90e208f 100644 --- a/src/zypper-info.cc +++ b/src/zypper-info.cc @@ -1,5 +1,3 @@ -#include "zypper-info.h" - #include #include @@ -11,8 +9,8 @@ #include "zypper.h" #include "zypper-main.h" -#include "zypper-utils.h" #include "zypper-misc.h" +#include "zypper-info.h" using namespace std; using namespace zypp; @@ -58,7 +56,7 @@ void printInfo(const Zypper & zypper, const Resolvable::Kind & kind) } // find installation candidate - ProvideProcess installer (God->architecture(), "" /*version*/); + ProvideProcess installer (ZConfig::instance().systemArchitecture(), "" /*version*/); invokeOnEach( pool.byIdentBegin( kind, *nameit ), pool.byIdentEnd( kind, *nameit ), zypp::functor::functorRef (installer) ); @@ -133,7 +131,7 @@ void printPkgInfo(const Zypper & zypper, else cout << _("not installed") << endl; - cout << _("Installed Size: ") << pool_item.resolvable()->size().asString() << endl; + cout << _("Installed Size: ") << pool_item.resolvable()->installsize() << endl; printSummaryDesc(pool_item.resolvable()); } diff --git a/src/zypper-misc.cc b/src/zypper-misc.cc index 40c586b..d4d7ac5 100644 --- a/src/zypper-misc.cc +++ b/src/zypper-misc.cc @@ -892,7 +892,7 @@ int summary(Zypper & zypper) else todowngrade[res->kind()].insert(res); - new_installed_size += res->size() - (*rmit)->size(); + new_installed_size += res->installsize() - (*rmit)->installsize(); to_be_removed[res->kind()].erase(*rmit); upgrade_downgrade = true; @@ -903,7 +903,7 @@ int summary(Zypper & zypper) if (!upgrade_downgrade) { toinstall[res->kind()].insert(res); - new_installed_size += res->size(); + new_installed_size += res->installsize(); } download_size += res->downloadSize(); @@ -916,7 +916,7 @@ int summary(Zypper & zypper) resit != it->second.end(); ++resit) { toremove[it->first].insert(*resit); - new_installed_size -= (*resit)->size(); + new_installed_size -= (*resit)->installsize(); } for (list::const_iterator it = zypper.runtimeData().srcpkgs_to_install.begin(); diff --git a/src/zypper-repo-callbacks.h b/src/zypper-repo-callbacks.h index fa0bc30..6dd04ff 100644 --- a/src/zypper-repo-callbacks.h +++ b/src/zypper-repo-callbacks.h @@ -162,7 +162,7 @@ struct DownloadResolvableReportReceiver : public zypp::callback::ReceiveReportdownloadSize () << " " // TranslatorExplanation %s is package size like "5.6 M" - << boost::format(_("(%s unpacked)")) % ro->size(); + << boost::format(_("(%s unpacked)")) % ro->installsize(); } Zypper::instance()->out().info(s.str()); } -- 2.7.4