From e99836f6330b6518d2aa91a0be6ee656f7d6e3d1 Mon Sep 17 00:00:00 2001 From: "piman@chromium.org" Date: Tue, 27 Oct 2009 23:26:59 +0000 Subject: linux: fix gcc 4.3 issues (for arm) These are mostly minor syntax / missing header fixes. Review URL: http://codereview.chromium.org/338037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30277 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/sync/engine/conflict_resolver.cc | 3 ++- chrome/browser/sync/engine/syncer_util.cc | 4 ++-- chrome/browser/sync/notifier/listener/listen_task.h | 2 +- chrome/browser/sync/notifier/listener/mediator_thread_impl.h | 4 ++-- chrome/browser/sync/syncable/syncable.cc | 1 + chrome/browser/sync/util/character_set_converters_posix.cc | 10 ++++++---- 6 files changed, 14 insertions(+), 10 deletions(-) (limited to 'chrome/browser/sync') diff --git a/chrome/browser/sync/engine/conflict_resolver.cc b/chrome/browser/sync/engine/conflict_resolver.cc index a59faca..469d682 100644 --- a/chrome/browser/sync/engine/conflict_resolver.cc +++ b/chrome/browser/sync/engine/conflict_resolver.cc @@ -531,11 +531,12 @@ bool AttemptToFixUpdateEntryInDeletedLocalTree(WriteTransaction* trans, id = parent.Get(syncable::PARENT_ID); } // If we find we've been looping we re-root the hierarchy. - if (loop_detection < 0) + if (loop_detection < 0) { if (id == entry.Get(syncable::ID)) reroot_id = entry.Get(syncable::PARENT_ID); else reroot_id = id; + } // Now we fix things up by undeleting all the folders in the item's path. id = parent_id; while (!id.IsRoot() && id != reroot_id) { diff --git a/chrome/browser/sync/engine/syncer_util.cc b/chrome/browser/sync/engine/syncer_util.cc index 8bd4819..8e32838 100644 --- a/chrome/browser/sync/engine/syncer_util.cc +++ b/chrome/browser/sync/engine/syncer_util.cc @@ -815,8 +815,8 @@ syncable::Id SyncerUtil::ComputePrevIdFromServerPosition( // If |candidate| is after |update_entry| according to the server // ordering, then we're done. ID is the tiebreaker. if ((candidate.Get(SERVER_POSITION_IN_PARENT) > position_in_parent) || - (candidate.Get(SERVER_POSITION_IN_PARENT) == position_in_parent) && - (candidate.Get(ID) > update_item->Get(ID))) { + ((candidate.Get(SERVER_POSITION_IN_PARENT) == position_in_parent) && + (candidate.Get(ID) > update_item->Get(ID)))) { return closest_sibling; } } diff --git a/chrome/browser/sync/notifier/listener/listen_task.h b/chrome/browser/sync/notifier/listener/listen_task.h index bd29d29..f8b32ce89 100644 --- a/chrome/browser/sync/notifier/listener/listen_task.h +++ b/chrome/browser/sync/notifier/listener/listen_task.h @@ -15,7 +15,7 @@ #include "talk/xmpp/xmpptask.h" namespace buzz { -class buzz::XmlElement; +class XmlElement; class Jid; } diff --git a/chrome/browser/sync/notifier/listener/mediator_thread_impl.h b/chrome/browser/sync/notifier/listener/mediator_thread_impl.h index ecd7533..a31da53 100644 --- a/chrome/browser/sync/notifier/listener/mediator_thread_impl.h +++ b/chrome/browser/sync/notifier/listener/mediator_thread_impl.h @@ -33,11 +33,11 @@ class TaskPump; } // namespace notifier namespace buzz { -class buzz::XmppClient; +class XmppClient; } // namespace buzz namespace talk_base { -class talk_base::SocketServer; +class SocketServer; } // namespace talk_base namespace browser_sync { diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc index 29d8430..550c495 100644 --- a/chrome/browser/sync/syncable/syncable.cc +++ b/chrome/browser/sync/syncable/syncable.cc @@ -1628,6 +1628,7 @@ MutableExtendedAttribute::MutableExtendedAttribute( ScopedKernelLock lock(trans->directory()); if (!Init(trans, kernel, &lock, key)) { ExtendedAttributeValue val; + val.is_deleted = false; val.dirty = true; i_ = kernel->extended_attributes->insert(std::make_pair(key, val)).first; good_ = true; diff --git a/chrome/browser/sync/util/character_set_converters_posix.cc b/chrome/browser/sync/util/character_set_converters_posix.cc index d038f1f..ba57214 100644 --- a/chrome/browser/sync/util/character_set_converters_posix.cc +++ b/chrome/browser/sync/util/character_set_converters_posix.cc @@ -38,24 +38,26 @@ void TrimPathStringToValidCharacter(PathString* string) { PathChar c = string->at(string->length() - 1 - partial_enc_bytes); if ((c & 0x0c0) == 0x080) // utf continuation char; continue; - if ((c & 0x0e0) == 0x0e0) // 2-byte encoded char. + if ((c & 0x0e0) == 0x0e0) { // 2-byte encoded char. if (1 == partial_enc_bytes) return; else break; - if ((c & 0x0f0) == 0xc0) // 3-byte encoded char. + } + if ((c & 0x0f0) == 0xc0) { // 3-byte encoded char. if (2 == partial_enc_bytes) return; else break; - if ((c & 0x0f8) == 0x0f0) // 4-byte encoded char. + } + if ((c & 0x0f8) == 0x0f0) { // 4-byte encoded char. if (3 == partial_enc_bytes) return; else break; + } } string->resize(string->length() - 1 - partial_enc_bytes); } } // namespace browser_sync - -- cgit v1.1