summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/util
diff options
context:
space:
mode:
authornick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 21:30:12 +0000
committernick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 21:30:12 +0000
commit92c3dc6b3fffbaf9fa2fa409120ca051bf317234 (patch)
treebd3635f12f049c215b6c33b83a64a78d9c1e2a45 /chrome/browser/sync/util
parent49000f228320e0071157928ec9054115d75c93e3 (diff)
downloadchromium_src-92c3dc6b3fffbaf9fa2fa409120ca051bf317234.zip
chromium_src-92c3dc6b3fffbaf9fa2fa409120ca051bf317234.tar.gz
chromium_src-92c3dc6b3fffbaf9fa2fa409120ca051bf317234.tar.bz2
Fix compiler warnings in chrome\browser\sync.
Warnings are treated as errors in the Chrome build. Most of these are just forcing the implicit conversion to maintain the previous behavior. TEST=sync unit tests BUG=none Review URL: http://codereview.chromium.org/193085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/util')
-rw-r--r--chrome/browser/sync/util/path_helpers.cc2
-rw-r--r--chrome/browser/sync/util/pthread_helpers.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/sync/util/path_helpers.cc b/chrome/browser/sync/util/path_helpers.cc
index 1cf8d4e..cafcfca 100644
--- a/chrome/browser/sync/util/path_helpers.cc
+++ b/chrome/browser/sync/util/path_helpers.cc
@@ -71,7 +71,7 @@ PathString ExpandTilde(const PathString& path) {
// Returns a string with length or fewer elements, careful to
// not truncate a string mid-surrogate pair.
PathString TruncatePathString(const PathString& original, int length) {
- if (original.size() <= length)
+ if (original.size() <= static_cast<size_t>(length))
return original;
if (length <= 0)
return original;
diff --git a/chrome/browser/sync/util/pthread_helpers.cc b/chrome/browser/sync/util/pthread_helpers.cc
index 4dadc55..663fc66 100644
--- a/chrome/browser/sync/util/pthread_helpers.cc
+++ b/chrome/browser/sync/util/pthread_helpers.cc
@@ -115,9 +115,9 @@ struct timespec GetPThreadAbsoluteTime(uint32 ms) {
// The number of 100 nanosecond intervals from Jan 1, 1601 'til Jan 1, 1970.
const int64 kOffset = GG_LONGLONG(116444736000000000);
timespec result;
- result.tv_sec = (n.QuadPart - kOffset) / 10000000;
- result.tv_nsec = (n.QuadPart - kOffset -
- (result.tv_sec * GG_LONGLONG(10000000))) * 100;
+ result.tv_sec = static_cast<long>((n.QuadPart - kOffset) / 10000000);
+ result.tv_nsec = static_cast<long>((n.QuadPart - kOffset -
+ (result.tv_sec * GG_LONGLONG(10000000))) * 100);
return result;
#else
struct timeval now;