summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-05-29 19:46:20 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-05-29 19:46:20 +0000
commitb5feacfaac4dc82888a6a2facd2866e7e560fa4b (patch)
tree00bed2eea431181a4cea7fdb9f342f7c5fd83a04
parent2ce1dfedaa9fe42d93b2be5b4322494a2eec6350 (diff)
downloadrockbox-b5feacfaac4dc82888a6a2facd2866e7e560fa4b.tar.gz
rockbox-b5feacfaac4dc82888a6a2facd2866e7e560fa4b.tar.bz2
rockbox-b5feacfaac4dc82888a6a2facd2866e7e560fa4b.zip
Fix some gcc 4.6 warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29933 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/base/system.cpp11
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp3
2 files changed, 9 insertions, 5 deletions
diff --git a/rbutil/rbutilqt/base/system.cpp b/rbutil/rbutilqt/base/system.cpp
index 4b97dea0f0..c7c28b3503 100644
--- a/rbutil/rbutilqt/base/system.cpp
+++ b/rbutil/rbutilqt/base/system.cpp
@@ -190,9 +190,14 @@ QString System::osVersionString(void)
#else
long cores = sysconf(_SC_NPROCESSORS_ONLN);
#endif
- result = QString("CPU: %1, %2 processor(s)").arg(u.machine).arg(cores);
- result += QString("<br/>System: %2<br/>Release: %3<br/>Version: %4")
- .arg(u.sysname).arg(u.release).arg(u.version);
+ if(ret != -1) {
+ result = QString("CPU: %1, %2 processor(s)").arg(u.machine).arg(cores);
+ result += QString("<br/>System: %2<br/>Release: %3<br/>Version: %4")
+ .arg(u.sysname).arg(u.release).arg(u.version);
+ }
+ else {
+ result = QString("(Error when retrieving system information)");
+ }
#if defined(Q_OS_MACX)
SInt32 major;
SInt32 minor;
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 611e848873..5841431f8a 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -1065,8 +1065,7 @@ void RbUtilQt::uninstallBootloader(void)
connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
- int result;
- result = bl->uninstall();
+ bl->uninstall();
logger->setFinished();