summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorpph34r@gmail.com <pph34r@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-01 06:48:16 +0000
committerpph34r@gmail.com <pph34r@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-01 06:48:16 +0000
commitc8a6432e13ee69c4deaa9c7ec549c0e00b0e237c (patch)
tree8689060403320428255135c52728bfdea2349bf1 /chrome
parent2e615f9166f359f41b987ff35f1e326f9f8ba8b0 (diff)
downloadchromium_src-c8a6432e13ee69c4deaa9c7ec549c0e00b0e237c.zip
chromium_src-c8a6432e13ee69c4deaa9c7ec549c0e00b0e237c.tar.gz
chromium_src-c8a6432e13ee69c4deaa9c7ec549c0e00b0e237c.tar.bz2
GCC 4.6 -Wunused-but-set-variable cleanup.
BUG=87490 TEST=None Review URL: http://codereview.chromium.org/7263013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc4
-rw-r--r--chrome/browser/extensions/extension_bookmark_manager_apitest.cc8
-rw-r--r--chrome/browser/extensions/extension_updater.cc2
-rw-r--r--chrome/browser/extensions/extension_webstore_private_api.cc2
-rw-r--r--chrome/browser/extensions/sandboxed_extension_unpacker.cc2
-rw-r--r--chrome/browser/history/text_database_manager_unittest.cc14
-rw-r--r--chrome/browser/idbbindingutilities_browsertest.cc3
-rw-r--r--chrome/browser/importer/profile_import_process_client.cc3
-rw-r--r--chrome/browser/net/predictor.cc5
-rw-r--r--chrome/browser/profiles/profile_manager.cc4
-rw-r--r--chrome/browser/sync/engine/syncer_unittest.cc3
-rw-r--r--chrome/browser/sync/syncable/syncable_unittest.cc3
-rw-r--r--chrome/browser/web_resource/web_resource_service.cc4
-rw-r--r--chrome/service/service_utility_process_host.cc3
-rw-r--r--chrome/test/ui_test_utils.cc2
-rw-r--r--chrome/test/webdriver/session_manager.cc2
16 files changed, 25 insertions, 39 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 95b103d..0323870 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -598,24 +598,20 @@ void ExtensionReadyNotificationObserver::Observe(
return;
}
- bool success = false;
switch (type.value) {
case NotificationType::EXTENSION_HOST_DID_STOP_LOADING:
// Only continue on with this method if our extension has been loaded
// and all the extension hosts have stopped loading.
if (!extension_ || !DidExtensionHostsStopLoading(manager_))
return;
- success = true;
break;
case NotificationType::EXTENSION_LOADED:
extension_ = Details<const Extension>(details).ptr();
if (!DidExtensionHostsStopLoading(manager_))
return;
- success = true;
break;
case NotificationType::EXTENSION_INSTALL_ERROR:
case NotificationType::EXTENSION_UPDATE_DISABLED:
- success = false;
break;
default:
NOTREACHED();
diff --git a/chrome/browser/extensions/extension_bookmark_manager_apitest.cc b/chrome/browser/extensions/extension_bookmark_manager_apitest.cc
index 9b76164..3d56be8 100644
--- a/chrome/browser/extensions/extension_bookmark_manager_apitest.cc
+++ b/chrome/browser/extensions/extension_bookmark_manager_apitest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -33,10 +33,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, BookmarkManagerEditDisabled) {
ui_test_utils::WaitForBookmarkModelToLoad(model);
const BookmarkNode* bar = model->GetBookmarkBarNode();
const BookmarkNode* folder = model->AddFolder(bar, 0, ASCIIToUTF16("Folder"));
- const BookmarkNode* node = model->AddURL(bar, 1, ASCIIToUTF16("AAA"),
- GURL("http://aaa.example.com"));
- node = model->AddURL(folder, 0, ASCIIToUTF16("BBB"),
- GURL("http://bbb.example.com"));
+ model->AddURL(bar, 1, ASCIIToUTF16("AAA"), GURL("http://aaa.example.com"));
+ model->AddURL(folder, 0, ASCIIToUTF16("BBB"), GURL("http://bbb.example.com"));
profile->GetPrefs()->SetBoolean(prefs::kEditBookmarksEnabled, false);
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index 04a1aea..aa4c14c9 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -673,7 +673,7 @@ class SafeManifestParser : public UtilityProcessHost::Client {
IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Failed,
OnParseUpdateManifestFailed)
IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP_EX()
+ IPC_END_MESSAGE_MAP()
return handled;
}
diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc
index a6c8221..6ba9b43 100644
--- a/chrome/browser/extensions/extension_webstore_private_api.cc
+++ b/chrome/browser/extensions/extension_webstore_private_api.cc
@@ -198,7 +198,7 @@ class SafeBeginInstallHelper : public UtilityProcessHost::Client {
OnJSONParseSucceeded)
IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseJSON_Failed, OnJSONParseFailed)
IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP_EX()
+ IPC_END_MESSAGE_MAP()
return handled;
}
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc
index 102a080..3a835d3 100644
--- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc
@@ -239,7 +239,7 @@ bool SandboxedExtensionUnpacker::OnMessageReceived(
IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackExtension_Failed,
OnUnpackExtensionFailed)
IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP_EX()
+ IPC_END_MESSAGE_MAP()
return handled;
}
diff --git a/chrome/browser/history/text_database_manager_unittest.cc b/chrome/browser/history/text_database_manager_unittest.cc
index 1ec7744..bd9e736 100644
--- a/chrome/browser/history/text_database_manager_unittest.cc
+++ b/chrome/browser/history/text_database_manager_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -79,7 +79,7 @@ void AddAllPages(TextDatabaseManager& manager, VisitDatabase* visit_db,
visit_row.transition = 0;
visit_row.segment_id = 0;
visit_row.is_indexed = false;
- VisitID visit_id = visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
+ visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
times->push_back(visit_row.visit_time);
manager.AddPageData(GURL(kURL1), visit_row.url_id, visit_row.visit_id,
@@ -89,7 +89,7 @@ void AddAllPages(TextDatabaseManager& manager, VisitDatabase* visit_db,
exploded.day_of_month++;
visit_row.url_id = 2;
visit_row.visit_time = Time::FromUTCExploded(exploded);
- visit_id = visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
+ visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
times->push_back(visit_row.visit_time);
manager.AddPageData(GURL(kURL2), visit_row.url_id, visit_row.visit_id,
visit_row.visit_time, UTF8ToUTF16(kTitle2),
@@ -98,7 +98,7 @@ void AddAllPages(TextDatabaseManager& manager, VisitDatabase* visit_db,
exploded.day_of_month++;
visit_row.url_id = 2;
visit_row.visit_time = Time::FromUTCExploded(exploded);
- visit_id = visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
+ visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
times->push_back(visit_row.visit_time);
manager.AddPageData(GURL(kURL3), visit_row.url_id, visit_row.visit_id,
visit_row.visit_time, UTF8ToUTF16(kTitle3),
@@ -108,7 +108,7 @@ void AddAllPages(TextDatabaseManager& manager, VisitDatabase* visit_db,
exploded.month++;
visit_row.url_id = 2;
visit_row.visit_time = Time::FromUTCExploded(exploded);
- visit_id = visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
+ visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
times->push_back(visit_row.visit_time);
manager.AddPageData(GURL(kURL4), visit_row.url_id, visit_row.visit_id,
visit_row.visit_time, UTF8ToUTF16(kTitle4),
@@ -117,7 +117,7 @@ void AddAllPages(TextDatabaseManager& manager, VisitDatabase* visit_db,
exploded.day_of_month++;
visit_row.url_id = 2;
visit_row.visit_time = Time::FromUTCExploded(exploded);
- visit_id = visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
+ visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
times->push_back(visit_row.visit_time);
manager.AddPageData(GURL(kURL5), visit_row.url_id, visit_row.visit_id,
visit_row.visit_time, UTF8ToUTF16(kTitle5),
@@ -127,7 +127,7 @@ void AddAllPages(TextDatabaseManager& manager, VisitDatabase* visit_db,
exploded.day_of_month++;
visit_row.url_id = 2;
visit_row.visit_time = Time::FromUTCExploded(exploded);
- visit_id = visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
+ visit_db->AddVisit(&visit_row, SOURCE_BROWSED);
times->push_back(visit_row.visit_time);
manager.AddPageData(GURL(kURL1), visit_row.url_id, visit_row.visit_id,
visit_row.visit_time, UTF8ToUTF16(kTitle1),
diff --git a/chrome/browser/idbbindingutilities_browsertest.cc b/chrome/browser/idbbindingutilities_browsertest.cc
index e984db0..6a2476c 100644
--- a/chrome/browser/idbbindingutilities_browsertest.cc
+++ b/chrome/browser/idbbindingutilities_browsertest.cc
@@ -144,8 +144,9 @@ class IDBKeyPathHelper : public UtilityProcessHost::Client {
// UtilityProcessHost::Client
bool OnMessageReceived(const IPC::Message& message) {
+ bool msg_is_ok = true;
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(IDBKeyPathHelper, message)
+ IPC_BEGIN_MESSAGE_MAP_EX(IDBKeyPathHelper, message, msg_is_ok)
IPC_MESSAGE_HANDLER(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded,
OnIDBKeysFromValuesAndKeyPathSucceeded)
IPC_MESSAGE_HANDLER(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed,
diff --git a/chrome/browser/importer/profile_import_process_client.cc b/chrome/browser/importer/profile_import_process_client.cc
index 9e88bef..407b5b3 100644
--- a/chrome/browser/importer/profile_import_process_client.cc
+++ b/chrome/browser/importer/profile_import_process_client.cc
@@ -77,8 +77,9 @@ void ProfileImportProcessClient::OnKeywordsImportReady(
bool ProfileImportProcessClient::OnMessageReceived(
const IPC::Message& message) {
+ bool msg_is_ok = true;
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(ProfileImportProcessClient, message)
+ IPC_BEGIN_MESSAGE_MAP_EX(ProfileImportProcessClient, message, msg_is_ok)
// Notification messages about the state of the import process.
IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_Import_Started,
OnImportStart)
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index bf3e0ba..e18f0bf 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -339,23 +339,18 @@ struct RightToLeftStringSorter {
if (!left_already_matched) return true;
if (!right_already_matched) return false;
- size_t left_length, right_length;
size_t left_start = left_host.find_last_of('.', left_already_matched - 1);
if (std::string::npos == left_start) {
- left_length = left_already_matched;
left_already_matched = left_start = 0;
} else {
- left_length = left_already_matched - left_start;
left_already_matched = left_start;
++left_start; // Don't compare the dot.
}
size_t right_start = right_host.find_last_of('.',
right_already_matched - 1);
if (std::string::npos == right_start) {
- right_length = right_already_matched;
right_already_matched = right_start = 0;
} else {
- right_length = right_already_matched - right_start;
right_already_matched = right_start;
++right_start; // Don't compare the dot.
}
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 8b20ab3..a8f039b 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -311,9 +311,7 @@ bool ProfileManager::AddProfile(Profile* profile) {
ProfileManager::ProfileInfo* ProfileManager::RegisterProfile(Profile* profile,
bool created) {
ProfileInfo* info = new ProfileInfo(profile, created);
- ProfilesInfoMap::iterator new_elem =
- (profiles_info_.insert(std::make_pair(profile->GetPath(), info))).first;
-
+ profiles_info_.insert(std::make_pair(profile->GetPath(), info));
return info;
}
diff --git a/chrome/browser/sync/engine/syncer_unittest.cc b/chrome/browser/sync/engine/syncer_unittest.cc
index 16c4783..7f086d0 100644
--- a/chrome/browser/sync/engine/syncer_unittest.cc
+++ b/chrome/browser/sync/engine/syncer_unittest.cc
@@ -1113,7 +1113,7 @@ TEST_F(SyncerTest, TestCommitListOrderingAndNewParentAndChild) {
parent.Put(syncable::BASE_VERSION, 1);
}
- int64 meta_handle_a, meta_handle_b;
+ int64 meta_handle_b;
const Id parent2_local_id = ids_.NewLocalId();
const Id child_local_id = ids_.NewLocalId();
{
@@ -1125,7 +1125,6 @@ TEST_F(SyncerTest, TestCommitListOrderingAndNewParentAndChild) {
parent2.Put(syncable::SPECIFICS, DefaultBookmarkSpecifics());
parent2.Put(syncable::ID, parent2_local_id);
- meta_handle_a = parent2.Get(syncable::META_HANDLE);
MutableEntry child(&wtrans, syncable::CREATE, parent2_local_id, child_name);
ASSERT_TRUE(child.good());
child.Put(syncable::IS_UNSYNCED, true);
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index b3bc880..099d01b 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -888,7 +888,7 @@ TEST_F(SyncableDirectoryTest, TestGetUnappliedUpdates) {
TEST_F(SyncableDirectoryTest, DeleteBug_531383) {
// Try to evoke a check failure...
TestIdFactory id_factory;
- int64 grandchild_handle, twin_handle;
+ int64 grandchild_handle;
{
WriteTransaction wtrans(FROM_HERE, UNITTEST, dir_.get());
MutableEntry parent(&wtrans, CREATE, id_factory.root(), "Bob");
@@ -912,7 +912,6 @@ TEST_F(SyncableDirectoryTest, DeleteBug_531383) {
ASSERT_TRUE(grandchild.Put(IS_DEL, false));
grandchild_handle = grandchild.Get(META_HANDLE);
- twin_handle = twin.Get(META_HANDLE);
}
dir_->SaveChanges();
{
diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc
index b745583..a68f038 100644
--- a/chrome/browser/web_resource/web_resource_service.cc
+++ b/chrome/browser/web_resource/web_resource_service.cc
@@ -151,8 +151,10 @@ class WebResourceService::UnpackerClient : public UtilityProcessHost::Client {
// UtilityProcessHost::Client
virtual bool OnMessageReceived(const IPC::Message& message) {
+ bool msg_is_ok = true;
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(WebResourceService::UnpackerClient, message)
+ IPC_BEGIN_MESSAGE_MAP_EX(WebResourceService::UnpackerClient, message,
+ msg_is_ok)
IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Succeeded,
OnUnpackWebResourceSucceeded)
IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Failed,
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
index 3ed794d..f656fd0 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -180,8 +180,9 @@ void ServiceUtilityProcessHost::OnRenderPDFPagesToMetafileSucceeded(
bool ServiceUtilityProcessHost::Client::OnMessageReceived(
const IPC::Message& message) {
+ bool msg_is_ok = true;
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(ServiceUtilityProcessHost, message)
+ IPC_BEGIN_MESSAGE_MAP_EX(ServiceUtilityProcessHost, message, msg_is_ok)
IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Failed,
Client::OnRenderPDFPagesToMetafileFailed)
IPC_MESSAGE_HANDLER(UtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded,
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index fe9cb71..09ac04e 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -656,8 +656,6 @@ bool SendKeyPressSync(const Browser* browser,
bool shift,
bool alt,
bool command) {
- base::TimeTicks start_time = base::TimeTicks::Now();
-
gfx::NativeWindow window = NULL;
if (!GetNativeWindow(browser, &window))
return false;
diff --git a/chrome/test/webdriver/session_manager.cc b/chrome/test/webdriver/session_manager.cc
index 4079443..45d45d3 100644
--- a/chrome/test/webdriver/session_manager.cc
+++ b/chrome/test/webdriver/session_manager.cc
@@ -42,12 +42,10 @@ bool SessionManager::Has(const std::string& id) const {
bool SessionManager::Remove(const std::string& id) {
std::map<std::string, Session*>::iterator it;
- Session* session;
base::AutoLock lock(map_lock_);
it = map_.find(id);
if (it == map_.end())
return false;
- session = it->second;
map_.erase(it);
return true;
}