Cleanups in libjingle to make it compile with chromium_code=1
Fixed all warnings that show up when compiling libjingle
in chromium with compiling with chromium_code=1.
chromium_code=1 enables various warnings that are off by
default. Most changes are for unused variables and consts.
R=pthatcher@google.com, wu@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/9699004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5769 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/base/timeutils.cc b/talk/base/timeutils.cc
index 54db341..fee85aa 100644
--- a/talk/base/timeutils.cc
+++ b/talk/base/timeutils.cc
@@ -25,6 +25,8 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <stdint.h>
+
#ifdef POSIX
#include <sys/time.h>
#if defined(OSX) || defined(IOS)
@@ -45,7 +47,6 @@
namespace talk_base {
-const uint32 LAST = 0xFFFFFFFF;
const uint32 HALF = 0x80000000;
uint64 TimeNanos() {
@@ -190,13 +191,13 @@
if (earlier <= later) {
return static_cast<long>(later - earlier);
} else {
- return static_cast<long>(later + (LAST - earlier) + 1);
+ return static_cast<long>(later + (UINT32_MAX - earlier) + 1);
}
} else {
if (later <= earlier) {
return -static_cast<long>(earlier - later);
} else {
- return -static_cast<long>(earlier + (LAST - later) + 1);
+ return -static_cast<long>(earlier + (UINT32_MAX - later) + 1);
}
}
#endif