summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-30 16:47:37 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-30 18:03:54 (GMT)
commit96b31c598f5c229c3acc0579ddfe22dd503e2b9d (patch)
treed73db22e591e49f088f359b9876df232eb99c6a9 /SwifTools/Idle
parentb19210aa48e7cea40929593daed997668fe789be (diff)
downloadswift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.zip
swift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.tar.bz2
Enable & fix pedantic CLang warnings.
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
Diffstat (limited to 'SwifTools/Idle')
-rw-r--r--SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp3
-rw-r--r--SwifTools/Idle/MacOSXIdleQuerier.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp b/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp
index df233a2..41238a0 100644
--- a/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp
+++ b/SwifTools/Idle/IdleQuerierTest/IdleQuerierTest.cpp
@@ -5,6 +5,7 @@
*/
#include <iostream>
+#include <cassert>
#include <SwifTools/Idle/PlatformIdleQuerier.h>
#include <Swiften/Base/sleep.h>
@@ -17,6 +18,6 @@ int main() {
std::cout << "Idle time: " << querier.getIdleTimeSeconds() << std::endl;
Swift::sleep(1000);
}
-
+ assert(false);
return 0;
}
diff --git a/SwifTools/Idle/MacOSXIdleQuerier.cpp b/SwifTools/Idle/MacOSXIdleQuerier.cpp
index 233d7c6..8eaece6 100644
--- a/SwifTools/Idle/MacOSXIdleQuerier.cpp
+++ b/SwifTools/Idle/MacOSXIdleQuerier.cpp
@@ -10,6 +10,7 @@
#include <cassert>
#include <iostream>
+#include <boost/numeric/conversion/cast.hpp>
#include <CoreFoundation/CoreFoundation.h>
namespace Swift {
@@ -28,7 +29,7 @@ int MacOSXIdleQuerier::getIdleTimeSeconds() {
assert(result);
(void) result;
CFRelease(property);
- return idle / 1000000000;
+ return boost::numeric_cast<int>(idle / 1000000000);
}
}