summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/display/display_info.cc11
-rw-r--r--ash/root_window_controller_unittest.cc3
-rw-r--r--base/metrics/statistics_recorder.cc3
-rw-r--r--base/security_unittest.cc4
-rw-r--r--build/common.gypi1
-rw-r--r--build/config/compiler/BUILD.gn1
-rw-r--r--chrome/browser/content_settings/host_content_settings_map_unittest.cc24
-rw-r--r--chrome/browser/enumerate_modules_model_win.cc2
-rw-r--r--chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc7
-rw-r--r--chrome/browser/extensions/external_provider_impl.cc60
-rw-r--r--chrome/browser/history/in_memory_url_index_unittest.cc3
-rw-r--r--chrome/browser/process_singleton_win.cc1
-rw-r--r--chrome/browser/search/hotword_service_unittest.cc16
-rw-r--r--chrome/browser/search/suggestions/suggestions_source.cc7
-rw-r--r--chrome/browser/ui/views/certificate_viewer_win.cc2
-rw-r--r--chrome/browser/ui/views/panels/panel_frame_view.cc2
-rw-r--r--chrome/browser/ui/webui/sync_internals_message_handler.cc4
-rw-r--r--chrome/installer/setup/setup_main.cc1
-rw-r--r--chrome/installer/util/installation_validator.cc6
-rw-r--r--chrome/installer/util/installer_state_unittest.cc1
-rw-r--r--cloud_print/service/win/cloud_print_service.cc10
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc1
-rw-r--r--content/child/npapi/webplugin_delegate_impl_win.cc2
-rw-r--r--content/renderer/render_font_warmup_win.cc2
-rw-r--r--gpu/command_buffer/service/buffer_manager_unittest.cc18
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc3
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc3
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc12
-rw-r--r--media/audio/win/audio_low_latency_input_win.cc13
-rw-r--r--mojo/public/cpp/system/tests/macros_unittest.cc1
-rw-r--r--net/base/file_stream_context_win.cc20
-rw-r--r--net/dns/host_resolver_impl.cc15
-rw-r--r--net/quic/quic_unacked_packet_map_test.cc4
-rw-r--r--net/socket/socks5_client_socket_unittest.cc2
-rw-r--r--net/socket/socks_client_socket_unittest.cc6
-rw-r--r--net/tools/dump_cache/cache_dumper.cc1
-rw-r--r--ui/base/dragdrop/os_exchange_data_win_unittest.cc6
-rw-r--r--ui/views/controls/menu/native_menu_win.cc6
-rw-r--r--ui/views/win/hwnd_message_handler.cc11
-rw-r--r--ui/wm/core/nested_accelerator_controller_unittest.cc1
-rw-r--r--win8/delegate_execute/crash_server_init.cc2
-rw-r--r--win8/metro_driver/chrome_app_view_ash.cc4
42 files changed, 125 insertions, 177 deletions
diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc
index 502cbd2..da10e97 100644
--- a/ash/display/display_info.cc
+++ b/ash/display/display_info.cc
@@ -95,18 +95,17 @@ void DisplayInfo::SetUse125DSFForUIScaling(bool enable) {
// static
DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
int64 id) {
- // Default bounds for a display.
- const int kDefaultHostWindowX = 200;
- const int kDefaultHostWindowY = 200;
- const int kDefaultHostWindowWidth = 1366;
- const int kDefaultHostWindowHeight = 768;
-
// Use larger than max int to catch overflow early.
static int64 synthesized_display_id = 2200000000LL;
#if defined(OS_WIN)
gfx::Rect bounds_in_native(aura::WindowTreeHost::GetNativeScreenSize());
#else
+ // Default bounds for a display.
+ const int kDefaultHostWindowX = 200;
+ const int kDefaultHostWindowY = 200;
+ const int kDefaultHostWindowWidth = 1366;
+ const int kDefaultHostWindowHeight = 768;
gfx::Rect bounds_in_native(kDefaultHostWindowX, kDefaultHostWindowY,
kDefaultHostWindowWidth, kDefaultHostWindowHeight);
#endif
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index dd80b41..0c321df 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -376,8 +376,7 @@ TEST_F(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) {
TEST_F(RootWindowControllerTest, ModalContainerBlockedSession) {
UpdateDisplay("600x600");
- Shell* shell = Shell::GetInstance();
- RootWindowController* controller = shell->GetPrimaryRootWindowController();
+ RootWindowController* controller = Shell::GetPrimaryRootWindowController();
aura::Window* lock_container =
controller->GetContainer(kShellWindowId_LockScreenContainer);
for (int block_reason = FIRST_BLOCK_REASON;
diff --git a/base/metrics/statistics_recorder.cc b/base/metrics/statistics_recorder.cc
index 62617c5..23c28d4 100644
--- a/base/metrics/statistics_recorder.cc
+++ b/base/metrics/statistics_recorder.cc
@@ -289,9 +289,8 @@ StatisticsRecorder::StatisticsRecorder() {
void StatisticsRecorder::DumpHistogramsToVlog(void* instance) {
DCHECK(VLOG_IS_ON(1));
- StatisticsRecorder* me = reinterpret_cast<StatisticsRecorder*>(instance);
string output;
- me->WriteGraph(std::string(), &output);
+ StatisticsRecorder::WriteGraph(std::string(), &output);
VLOG(1) << output;
}
diff --git a/base/security_unittest.cc b/base/security_unittest.cc
index a6d3480..d786273 100644
--- a/base/security_unittest.cc
+++ b/base/security_unittest.cc
@@ -194,7 +194,9 @@ TEST(SecurityTest, MAYBE_NewOverflow) {
}
// On windows, the compiler prevents static array sizes of more than
// 0x7fffffff (error C2148).
-#if !defined(OS_WIN) || !defined(ARCH_CPU_64_BITS)
+#if defined(OS_WIN) && defined(ARCH_CPU_64_BITS)
+ ALLOW_UNUSED_LOCAL(kDynamicArraySize);
+#else
{
scoped_ptr<char[][kArraySize2]> array_pointer(new (nothrow)
char[kDynamicArraySize][kArraySize2]);
diff --git a/build/common.gypi b/build/common.gypi
index 63cd40c..77939be 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -5417,7 +5417,6 @@
# removed as code is fixed.
4100, # Unreferenced formal parameter
4121, # Alignment of a member was sensitive to packing
- 4189, # Local variable is initialized but not referenced
4244, # Conversion from 'type1' to 'type2', possible loss of data
4481, # Nonstandard extension used: override specifier 'keyword'
4505, # Unreferenced local function has been removed
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 0d9e501..ae12eda 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -691,7 +691,6 @@ config("default_warnings") {
"/wd4100", # Unreferenced formal function parameter.
"/wd4121", # Alignment of a member was sensitive to packing.
- "/wd4189", # A variable was declared and initialized but never used.
"/wd4244", # Conversion: possible loss of data.
"/wd4481", # Nonstandard extension: override specifier.
"/wd4505", # Unreferenced local function has been removed.
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
index 0018d7f..4982529 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -914,36 +914,32 @@ TEST_F(HostContentSettingsMapTest, GetContentSetting) {
}
TEST_F(HostContentSettingsMapTest, ShouldAllowAllContent) {
- TestingProfile profile;
- HostContentSettingsMap* host_content_settings_map =
- profile.GetHostContentSettingsMap();
-
GURL http_host("http://example.com/");
GURL https_host("https://example.com/");
GURL embedder("chrome://foo");
GURL extension("chrome-extension://foo");
- EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_FALSE(HostContentSettingsMap::ShouldAllowAllContent(
http_host, embedder, CONTENT_SETTINGS_TYPE_NOTIFICATIONS));
- EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_FALSE(HostContentSettingsMap::ShouldAllowAllContent(
http_host, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION));
- EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_FALSE(HostContentSettingsMap::ShouldAllowAllContent(
http_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES));
- EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_TRUE(HostContentSettingsMap::ShouldAllowAllContent(
https_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES));
- EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_TRUE(HostContentSettingsMap::ShouldAllowAllContent(
https_host, embedder, CONTENT_SETTINGS_TYPE_COOKIES));
- EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_TRUE(HostContentSettingsMap::ShouldAllowAllContent(
embedder, http_host, CONTENT_SETTINGS_TYPE_COOKIES));
#if defined(ENABLE_EXTENSIONS)
- EXPECT_TRUE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_TRUE(HostContentSettingsMap::ShouldAllowAllContent(
extension, extension, CONTENT_SETTINGS_TYPE_COOKIES));
#else
- EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_FALSE(HostContentSettingsMap::ShouldAllowAllContent(
extension, extension, CONTENT_SETTINGS_TYPE_COOKIES));
#endif
- EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_FALSE(HostContentSettingsMap::ShouldAllowAllContent(
extension, extension, CONTENT_SETTINGS_TYPE_PLUGINS));
- EXPECT_FALSE(host_content_settings_map->ShouldAllowAllContent(
+ EXPECT_FALSE(HostContentSettingsMap::ShouldAllowAllContent(
extension, http_host, CONTENT_SETTINGS_TYPE_COOKIES));
}
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc
index d66730f..e69f37f 100644
--- a/chrome/browser/enumerate_modules_model_win.cc
+++ b/chrome/browser/enumerate_modules_model_win.cc
@@ -979,8 +979,6 @@ void EnumerateModulesModel::MaybePostScanningTask() {
static bool done = false;
if (!done) {
done = true;
-
- const CommandLine& cmd_line = *CommandLine::ForCurrentProcess();
if (base::win::GetVersion() == base::win::VERSION_XP) {
check_modules_timer_.Start(FROM_HERE,
base::TimeDelta::FromMilliseconds(kModuleCheckDelayMs),
diff --git a/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc b/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
index eafd730..08f30be 100644
--- a/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
+++ b/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
@@ -336,10 +336,9 @@ IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest,
EXPECT_EQ(TRUE, ::IsWindow(hwnd));
// Create a new browser window to prevent the message loop from terminating.
- Browser* new_browser = chrome::FindBrowserWithWebContents(
- browser()->OpenURL(content::OpenURLParams(
- GURL("about:"), content::Referrer(), NEW_WINDOW,
- ui::PAGE_TRANSITION_TYPED, false)));
+ browser()->OpenURL(content::OpenURLParams(GURL("about:"), content::Referrer(),
+ NEW_WINDOW,
+ ui::PAGE_TRANSITION_TYPED, false));
// Forcibly closing the browser HWND should not cause a crash.
EXPECT_EQ(TRUE, ::CloseWindow(hwnd));
diff --git a/chrome/browser/extensions/external_provider_impl.cc b/chrome/browser/extensions/external_provider_impl.cc
index 963ccc4..6a84193 100644
--- a/chrome/browser/extensions/external_provider_impl.cc
+++ b/chrome/browser/extensions/external_provider_impl.cc
@@ -465,7 +465,9 @@ void ExternalProviderImpl::CreateExternalProviders(
#endif
bool is_chromeos_demo_session = false;
+#if !defined(OS_WIN)
int bundled_extension_creation_flags = Extension::NO_FLAGS;
+#endif
#if defined(OS_CHROMEOS)
user_manager::UserManager* user_manager = user_manager::UserManager::Get();
is_chromeos_demo_session =
@@ -473,26 +475,7 @@ void ExternalProviderImpl::CreateExternalProviders(
connector->GetDeviceMode() == policy::DEVICE_MODE_RETAIL_KIOSK;
bundled_extension_creation_flags = Extension::FROM_WEBSTORE |
Extension::WAS_INSTALLED_BY_DEFAULT;
-#endif
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- if (!profile->IsSupervised()) {
- provider_list->push_back(
- linked_ptr<ExternalProviderInterface>(
- new ExternalProviderImpl(
- service,
- new ExternalPrefLoader(
- chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS,
- ExternalPrefLoader::NONE,
- NULL),
- profile,
- Manifest::EXTERNAL_PREF,
- Manifest::EXTERNAL_PREF_DOWNLOAD,
- bundled_extension_creation_flags)));
- }
-#endif
-
-#if defined(OS_CHROMEOS)
if (!is_chromeos_demo_session && !is_chrome_os_public_session) {
int external_apps_path_id = profile->IsSupervised() ?
chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS :
@@ -538,10 +521,35 @@ void ExternalProviderImpl::CreateExternalProviders(
Manifest::INVALID_LOCATION,
Extension::NO_FLAGS)));
}
+#elif defined(OS_LINUX)
+ if (!profile->IsSupervised()) {
+ provider_list->push_back(
+ linked_ptr<ExternalProviderInterface>(
+ new ExternalProviderImpl(
+ service,
+ new ExternalPrefLoader(
+ chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS,
+ ExternalPrefLoader::NONE,
+ NULL),
+ profile,
+ Manifest::EXTERNAL_PREF,
+ Manifest::EXTERNAL_PREF_DOWNLOAD,
+ bundled_extension_creation_flags)));
+ }
#endif
if (!profile->IsSupervised() && !is_chromeos_demo_session) {
-#if !defined(OS_WIN)
+#if defined(OS_WIN)
+ provider_list->push_back(
+ linked_ptr<ExternalProviderInterface>(
+ new ExternalProviderImpl(
+ service,
+ new ExternalRegistryLoader,
+ profile,
+ Manifest::EXTERNAL_REGISTRY,
+ Manifest::EXTERNAL_PREF_DOWNLOAD,
+ Extension::NO_FLAGS)));
+#else
provider_list->push_back(
linked_ptr<ExternalProviderInterface>(
new ExternalProviderImpl(
@@ -553,7 +561,6 @@ void ExternalProviderImpl::CreateExternalProviders(
Manifest::EXTERNAL_PREF,
Manifest::EXTERNAL_PREF_DOWNLOAD,
bundled_extension_creation_flags)));
-#endif
// Define a per-user source of external extensions.
#if defined(OS_MACOSX)
@@ -569,17 +576,6 @@ void ExternalProviderImpl::CreateExternalProviders(
Manifest::EXTERNAL_PREF_DOWNLOAD,
Extension::NO_FLAGS)));
#endif
-
-#if defined(OS_WIN)
- provider_list->push_back(
- linked_ptr<ExternalProviderInterface>(
- new ExternalProviderImpl(
- service,
- new ExternalRegistryLoader,
- profile,
- Manifest::EXTERNAL_REGISTRY,
- Manifest::EXTERNAL_PREF_DOWNLOAD,
- Extension::NO_FLAGS)));
#endif
#if !defined(OS_CHROMEOS)
diff --git a/chrome/browser/history/in_memory_url_index_unittest.cc b/chrome/browser/history/in_memory_url_index_unittest.cc
index 2a79e0d..59f8a80 100644
--- a/chrome/browser/history/in_memory_url_index_unittest.cc
+++ b/chrome/browser/history/in_memory_url_index_unittest.cc
@@ -983,12 +983,11 @@ TEST_F(InMemoryURLIndexTest, WhitelistedURLs) {
{ "xmpp://guest@example.com", false },
};
- URLIndexPrivateData& private_data(*GetPrivateData());
const std::set<std::string>& whitelist(scheme_whitelist());
for (size_t i = 0; i < arraysize(data); ++i) {
GURL url(data[i].url_spec);
EXPECT_EQ(data[i].expected_is_whitelisted,
- private_data.URLSchemeIsWhitelisted(url, whitelist));
+ URLIndexPrivateData::URLSchemeIsWhitelisted(url, whitelist));
}
}
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index 122e83d..960d6d8 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -160,7 +160,6 @@ bool ProcessLaunchNotification(
return false;
// Handle the WM_COPYDATA message from another process.
- HWND hwnd = reinterpret_cast<HWND>(wparam);
const COPYDATASTRUCT* cds = reinterpret_cast<COPYDATASTRUCT*>(lparam);
CommandLine parsed_command_line(CommandLine::NO_PROGRAM);
diff --git a/chrome/browser/search/hotword_service_unittest.cc b/chrome/browser/search/hotword_service_unittest.cc
index c35932e..8d62047 100644
--- a/chrome/browser/search/hotword_service_unittest.cc
+++ b/chrome/browser/search/hotword_service_unittest.cc
@@ -117,13 +117,10 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedBadFieldTrial) {
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
- HotwordServiceFactory* hotword_service_factory =
- HotwordServiceFactory::GetInstance();
-
// Check that the service exists so that a NULL service be ruled out in
// following tests.
HotwordService* hotword_service =
- hotword_service_factory->GetForProfile(profile.get());
+ HotwordServiceFactory::GetForProfile(profile.get());
EXPECT_TRUE(hotword_service != NULL);
// When the field trial is empty or Disabled, it should not be allowed.
@@ -137,7 +134,7 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedBadFieldTrial) {
hotword_internal::kHotwordFieldTrialDisabledGroupName));
group = base::FieldTrialList::FindFullName(
hotword_internal::kHotwordFieldTrialName);
- EXPECT_TRUE(group ==hotword_internal::kHotwordFieldTrialDisabledGroupName);
+ EXPECT_TRUE(group == hotword_internal::kHotwordFieldTrialDisabledGroupName);
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(profile.get()));
// Set a valid locale with invalid field trial to be sure it is
@@ -154,13 +151,10 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) {
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
- HotwordServiceFactory* hotword_service_factory =
- HotwordServiceFactory::GetInstance();
-
// Check that the service exists so that a NULL service be ruled out in
// following tests.
HotwordService* hotword_service =
- hotword_service_factory->GetForProfile(profile.get());
+ HotwordServiceFactory::GetForProfile(profile.get());
EXPECT_TRUE(hotword_service != NULL);
// Set the field trial to a valid one.
@@ -194,10 +188,8 @@ TEST_P(HotwordServiceTest, AudioLoggingPrefSetCorrectly) {
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
- HotwordServiceFactory* hotword_service_factory =
- HotwordServiceFactory::GetInstance();
HotwordService* hotword_service =
- hotword_service_factory->GetForProfile(profile.get());
+ HotwordServiceFactory::GetForProfile(profile.get());
EXPECT_TRUE(hotword_service != NULL);
// If it's a fresh profile, although the default value is true,
diff --git a/chrome/browser/search/suggestions/suggestions_source.cc b/chrome/browser/search/suggestions/suggestions_source.cc
index a79589a..486d53d 100644
--- a/chrome/browser/search/suggestions/suggestions_source.cc
+++ b/chrome/browser/search/suggestions/suggestions_source.cc
@@ -116,11 +116,8 @@ std::string SuggestionsSource::GetSource() const {
void SuggestionsSource::StartDataRequest(
const std::string& path, int render_process_id, int render_frame_id,
const content::URLDataSource::GotDataCallback& callback) {
- SuggestionsServiceFactory* suggestions_service_factory =
- SuggestionsServiceFactory::GetInstance();
-
- SuggestionsService* suggestions_service(
- suggestions_service_factory->GetForProfile(profile_));
+ SuggestionsService* suggestions_service =
+ SuggestionsServiceFactory::GetForProfile(profile_);
if (!suggestions_service) {
callback.Run(NULL);
diff --git a/chrome/browser/ui/views/certificate_viewer_win.cc b/chrome/browser/ui/views/certificate_viewer_win.cc
index 9390358..2ae3675 100644
--- a/chrome/browser/ui/views/certificate_viewer_win.cc
+++ b/chrome/browser/ui/views/certificate_viewer_win.cc
@@ -45,7 +45,7 @@ void ShowCertificateViewerImpl(content::WebContents* web_contents,
base::MessageLoop::current());
// This next call blocks but keeps processing windows messages, making it
// modal to the browser window.
- BOOL rv = ::CryptUIDlgViewCertificate(&view_info, &properties_changed);
+ ::CryptUIDlgViewCertificate(&view_info, &properties_changed);
CertFreeCertificateContext(cert_list);
}
diff --git a/chrome/browser/ui/views/panels/panel_frame_view.cc b/chrome/browser/ui/views/panels/panel_frame_view.cc
index 6ebf539..02eaf41 100644
--- a/chrome/browser/ui/views/panels/panel_frame_view.cc
+++ b/chrome/browser/ui/views/panels/panel_frame_view.cc
@@ -351,7 +351,7 @@ void PanelFrameView::SetWindowCornerStyle(panel::CornerStyle corner_style) {
// window region if the region really differs.
HWND native_window = views::HWNDForWidget(panel_view_->window());
base::win::ScopedRegion current_region(::CreateRectRgn(0, 0, 0, 0));
- int current_region_result = ::GetWindowRgn(native_window, current_region);
+ ::GetWindowRgn(native_window, current_region);
gfx::Path window_mask;
GetWindowMask(size(), &window_mask);
diff --git a/chrome/browser/ui/webui/sync_internals_message_handler.cc b/chrome/browser/ui/webui/sync_internals_message_handler.cc
index fa21977..996bf4c 100644
--- a/chrome/browser/ui/webui/sync_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/sync_internals_message_handler.cc
@@ -221,6 +221,6 @@ void SyncInternalsMessageHandler::SendAboutInfo() {
// May return NULL (e.g., if sync is disabled on the command line).
ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() {
Profile* profile = Profile::FromWebUI(web_ui());
- ProfileSyncServiceFactory* factory = ProfileSyncServiceFactory::GetInstance();
- return factory->GetForProfile(profile->GetOriginalProfile());
+ return ProfileSyncServiceFactory::GetForProfile(
+ profile->GetOriginalProfile());
}
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index b02be69..4cd2256 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -1532,7 +1532,6 @@ InstallStatus InstallProductsHelper(
COMPILE_ASSERT(BrowserDistribution::NUM_TYPES == 4,
add_support_for_new_products_here_);
const uint32 kBrowserBit = 1 << BrowserDistribution::CHROME_BROWSER;
- const uint32 kAppHostBit = 1 << BrowserDistribution::CHROME_APP_HOST;
int message_id = 0;
proceed_with_installation = false;
diff --git a/chrome/installer/util/installation_validator.cc b/chrome/installer/util/installation_validator.cc
index 6a982b8..be5959a 100644
--- a/chrome/installer/util/installation_validator.cc
+++ b/chrome/installer/util/installation_validator.cc
@@ -29,9 +29,6 @@ BrowserDistribution::Type
void InstallationValidator::ChromeRules::AddUninstallSwitchExpectations(
const ProductContext& ctx,
SwitchExpectations* expectations) const {
- const bool is_multi_install =
- ctx.state.uninstall_command().HasSwitch(switches::kMultiInstall);
-
// --chrome should be present for uninstall iff --multi-install. This wasn't
// the case in Chrome 10 (between r68996 and r72497), though, so consider it
// optional.
@@ -40,9 +37,6 @@ void InstallationValidator::ChromeRules::AddUninstallSwitchExpectations(
void InstallationValidator::ChromeRules::AddRenameSwitchExpectations(
const ProductContext& ctx,
SwitchExpectations* expectations) const {
- const bool is_multi_install =
- ctx.state.uninstall_command().HasSwitch(switches::kMultiInstall);
-
// --chrome should not be present for rename. It was for a time, so we'll be
// lenient so that mini_installer tests pass.
diff --git a/chrome/installer/util/installer_state_unittest.cc b/chrome/installer/util/installer_state_unittest.cc
index e9a19a4b..4faaee0 100644
--- a/chrome/installer/util/installer_state_unittest.cc
+++ b/chrome/installer/util/installer_state_unittest.cc
@@ -374,7 +374,6 @@ TEST_F(InstallerStateTest, WithProduct) {
TEST_F(InstallerStateTest, InstallerResult) {
const bool system_level = true;
- bool multi_install = false;
HKEY root = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
RegKey key;
diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc
index 18d9a198..c1b9601 100644
--- a/cloud_print/service/win/cloud_print_service.cc
+++ b/cloud_print/service/win/cloud_print_service.cc
@@ -2,7 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Work around warning in atlbase.h
+// https://connect.microsoft.com/VisualStudio/feedback/details/1032199/atlbase-h-gives-warning-c4189-when-compiling-with-atl-no-com-support
+#pragma warning(push)
+#pragma warning(disable:4189)
#include <atlbase.h>
+#pragma warning(pop)
#include <security.h>
#include <iomanip>
@@ -334,10 +339,9 @@ class CloudPrintServiceModule
base::FilePath file = user_data_dir.Append(chrome::kServiceStateFileName);
std::string contents;
+ base::ReadFileToString(file, &contents);
ServiceState service_state;
-
- bool is_valid = base::ReadFileToString(file, &contents) &&
- service_state.FromString(contents);
+ service_state.FromString(contents);
std::string proxy_id = service_state.proxy_id();
LOG(INFO) << file.value() << ": " << contents;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 9d6b2e2..3865017 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -670,7 +670,6 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::GetNativeViewAccessible() {
aura::WindowTreeHost* host = window_->GetHost();
if (!host)
return static_cast<gfx::NativeViewAccessible>(NULL);
- HWND hwnd = host->GetAcceleratedWidget();
BrowserAccessibilityManager* manager =
host_->GetOrCreateRootBrowserAccessibilityManager();
if (manager)
diff --git a/content/child/npapi/webplugin_delegate_impl_win.cc b/content/child/npapi/webplugin_delegate_impl_win.cc
index 1ada5c7..fe7bac7 100644
--- a/content/child/npapi/webplugin_delegate_impl_win.cc
+++ b/content/child/npapi/webplugin_delegate_impl_win.cc
@@ -823,7 +823,7 @@ void WebPluginDelegateImpl::WindowedSetWindow() {
// Reset this flag before entering the instance in case of side-effects.
windowed_did_set_window_ = true;
- NPError err = instance()->NPP_SetWindow(&window_);
+ instance()->NPP_SetWindow(&window_);
if (quirks_ & PLUGIN_QUIRK_SETWINDOW_TWICE)
instance()->NPP_SetWindow(&window_);
diff --git a/content/renderer/render_font_warmup_win.cc b/content/renderer/render_font_warmup_win.cc
index effdea4..3fc90f1 100644
--- a/content/renderer/render_font_warmup_win.cc
+++ b/content/renderer/render_font_warmup_win.cc
@@ -191,7 +191,7 @@ SkFontMgr* GetPreSandboxWarmupFontMgr() {
IDWriteFactory* factory;
CreateDirectWriteFactory(&factory);
- IDWriteFontCollection* collection = GetCustomFontCollection(factory);
+ GetCustomFontCollection(factory);
PatchDWriteFactory(factory);
diff --git a/gpu/command_buffer/service/buffer_manager_unittest.cc b/gpu/command_buffer/service/buffer_manager_unittest.cc
index 5c24eb0..bef0089 100644
--- a/gpu/command_buffer/service/buffer_manager_unittest.cc
+++ b/gpu/command_buffer/service/buffer_manager_unittest.cc
@@ -210,21 +210,21 @@ TEST_F(BufferManagerTest, DoBufferSubData) {
TEST_F(BufferManagerTest, GetRange) {
const GLuint kClientBufferId = 1;
const GLuint kServiceBufferId = 11;
- const uint8 data[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+ const GLsizeiptr kDataSize = 10;
manager_->CreateBuffer(kClientBufferId, kServiceBufferId);
Buffer* buffer = manager_->GetBuffer(kClientBufferId);
ASSERT_TRUE(buffer != NULL);
manager_->SetTarget(buffer, GL_ELEMENT_ARRAY_BUFFER);
- DoBufferData(buffer, sizeof(data), GL_STATIC_DRAW, NULL, GL_NO_ERROR);
+ DoBufferData(buffer, kDataSize, GL_STATIC_DRAW, NULL, GL_NO_ERROR);
const char* buf =
- static_cast<const char*>(buffer->GetRange(0, sizeof(data)));
+ static_cast<const char*>(buffer->GetRange(0, kDataSize));
ASSERT_TRUE(buf != NULL);
const char* buf1 =
- static_cast<const char*>(buffer->GetRange(1, sizeof(data) - 1));
+ static_cast<const char*>(buffer->GetRange(1, kDataSize - 1));
EXPECT_EQ(buf + 1, buf1);
- EXPECT_TRUE(buffer->GetRange(sizeof(data), 1) == NULL);
- EXPECT_TRUE(buffer->GetRange(0, sizeof(data) + 1) == NULL);
- EXPECT_TRUE(buffer->GetRange(-1, sizeof(data)) == NULL);
+ EXPECT_TRUE(buffer->GetRange(kDataSize, 1) == NULL);
+ EXPECT_TRUE(buffer->GetRange(0, kDataSize + 1) == NULL);
+ EXPECT_TRUE(buffer->GetRange(-1, kDataSize) == NULL);
EXPECT_TRUE(buffer->GetRange(-0, -1) == NULL);
const int size = 0x20000;
DoBufferData(buffer, size / 2, GL_STATIC_DRAW, NULL, GL_NO_ERROR);
@@ -350,7 +350,7 @@ TEST_F(BufferManagerTest, GetMaxValueForRangeUint32) {
TEST_F(BufferManagerTest, UseDeletedBuffer) {
const GLuint kClientBufferId = 1;
const GLuint kServiceBufferId = 11;
- const uint32 data[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+ const GLsizeiptr kDataSize = 10;
manager_->CreateBuffer(kClientBufferId, kServiceBufferId);
scoped_refptr<Buffer> buffer = manager_->GetBuffer(kClientBufferId);
ASSERT_TRUE(buffer.get() != NULL);
@@ -358,7 +358,7 @@ TEST_F(BufferManagerTest, UseDeletedBuffer) {
// Remove buffer
manager_->RemoveBuffer(kClientBufferId);
// Use it after removing
- DoBufferData(buffer.get(), sizeof(data), GL_STATIC_DRAW, NULL, GL_NO_ERROR);
+ DoBufferData(buffer.get(), kDataSize, GL_STATIC_DRAW, NULL, GL_NO_ERROR);
// Check that it gets deleted when the last reference is released.
EXPECT_CALL(*gl_, DeleteBuffersARB(1, ::testing::Pointee(kServiceBufferId)))
.Times(1)
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
index a858cf7..fd28f75 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
@@ -54,8 +54,7 @@ namespace gles2 {
using namespace cmds;
TEST_P(GLES2DecoderWithShaderTest, GetVertexAttribPointervSucceeds) {
- const float dummy = 0;
- const GLuint kOffsetToTestFor = sizeof(dummy) * 4;
+ const GLuint kOffsetToTestFor = sizeof(float) * 4;
const GLuint kIndexToTest = 1;
GetVertexAttribPointerv::Result* result =
static_cast<GetVertexAttribPointerv::Result*>(shared_memory_address_);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
index 36afe38..a27bb3d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -1532,8 +1532,7 @@ void GLES2DecoderTestBase::DoBufferSubData(
void GLES2DecoderTestBase::SetupVertexBuffer() {
DoEnableVertexAttribArray(1);
DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
- GLfloat f = 0;
- DoBufferData(GL_ARRAY_BUFFER, kNumVertices * 2 * sizeof(f));
+ DoBufferData(GL_ARRAY_BUFFER, kNumVertices * 2 * sizeof(GLfloat));
}
void GLES2DecoderTestBase::SetupAllNeededVertexBuffers() {
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
index 789b48a..78fa020 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
@@ -644,11 +644,10 @@ TEST_P(GLES2DecoderTest, ReadPixelsOutOfRange) {
TEST_P(GLES2DecoderTest, ReadPixelsInvalidArgs) {
typedef ReadPixels::Result Result;
- Result* result = GetSharedMemoryAs<Result*>();
uint32 result_shm_id = kSharedMemoryId;
uint32 result_shm_offset = kSharedMemoryOffset;
uint32 pixels_shm_id = kSharedMemoryId;
- uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(*result);
+ uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(Result);
EXPECT_CALL(*gl_, ReadPixels(_, _, _, _, _, _, _)).Times(0);
ReadPixels cmd;
cmd.Init(0,
@@ -750,14 +749,13 @@ TEST_P(GLES2DecoderManualInitTest, ReadPixelsAsyncError) {
InitDecoder(init);
typedef ReadPixels::Result Result;
- Result* result = GetSharedMemoryAs<Result*>();
const GLsizei kWidth = 4;
const GLsizei kHeight = 4;
uint32 result_shm_id = kSharedMemoryId;
uint32 result_shm_offset = kSharedMemoryOffset;
uint32 pixels_shm_id = kSharedMemoryId;
- uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(*result);
+ uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(Result);
EXPECT_CALL(*gl_, GetError())
// first error check must pass to get to the test
@@ -1637,11 +1635,10 @@ TEST_P(GLES2DecoderTest, ReadPixelsGLError) {
GLsizei width = 2;
GLsizei height = 4;
typedef ReadPixels::Result Result;
- Result* result = GetSharedMemoryAs<Result*>();
uint32 result_shm_id = kSharedMemoryId;
uint32 result_shm_offset = kSharedMemoryOffset;
uint32 pixels_shm_id = kSharedMemoryId;
- uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(*result);
+ uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(Result);
EXPECT_CALL(*gl_, GetError())
.WillOnce(Return(GL_NO_ERROR))
.WillOnce(Return(GL_OUT_OF_MEMORY))
@@ -1765,11 +1762,10 @@ TEST_P(GLES2DecoderWithShaderTest, UnClearedAttachmentsGetClearedOnReadPixels) {
.Times(1)
.RetiresOnSaturation();
typedef ReadPixels::Result Result;
- Result* result = GetSharedMemoryAs<Result*>();
uint32 result_shm_id = kSharedMemoryId;
uint32 result_shm_offset = kSharedMemoryOffset;
uint32 pixels_shm_id = kSharedMemoryId;
- uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(*result);
+ uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(Result);
ReadPixels cmd;
cmd.Init(0,
0,
diff --git a/media/audio/win/audio_low_latency_input_win.cc b/media/audio/win/audio_low_latency_input_win.cc
index d618d60..67426d6 100644
--- a/media/audio/win/audio_low_latency_input_win.cc
+++ b/media/audio/win/audio_low_latency_input_win.cc
@@ -240,9 +240,10 @@ void WASAPIAudioInputStream::SetVolume(double volume) {
// Set a new master volume level. Valid volume levels are in the range
// 0.0 to 1.0. Ignore volume-change events.
- HRESULT hr = simple_audio_volume_->SetMasterVolume(static_cast<float>(volume),
- NULL);
- DLOG_IF(WARNING, FAILED(hr)) << "Failed to set new input master volume.";
+ HRESULT hr =
+ simple_audio_volume_->SetMasterVolume(static_cast<float>(volume), NULL);
+ if (FAILED(hr))
+ DLOG(WARNING) << "Failed to set new input master volume.";
// Update the AGC volume level based on the last setting above. Note that,
// the volume-level resolution is not infinite and it is therefore not
@@ -260,7 +261,8 @@ double WASAPIAudioInputStream::GetVolume() {
// Retrieve the current volume level. The value is in the range 0.0 to 1.0.
float level = 0.0f;
HRESULT hr = simple_audio_volume_->GetMasterVolume(&level);
- DLOG_IF(WARNING, FAILED(hr)) << "Failed to get input master volume.";
+ if (FAILED(hr))
+ DLOG(WARNING) << "Failed to get input master volume.";
return static_cast<double>(level);
}
@@ -274,7 +276,8 @@ bool WASAPIAudioInputStream::IsMuted() {
// Retrieves the current muting state for the audio session.
BOOL is_muted = FALSE;
HRESULT hr = simple_audio_volume_->GetMute(&is_muted);
- DLOG_IF(WARNING, FAILED(hr)) << "Failed to get input master volume.";
+ if (FAILED(hr))
+ DLOG(WARNING) << "Failed to get input master volume.";
return is_muted != FALSE;
}
diff --git a/mojo/public/cpp/system/tests/macros_unittest.cc b/mojo/public/cpp/system/tests/macros_unittest.cc
index 99b158d..f884baa 100644
--- a/mojo/public/cpp/system/tests/macros_unittest.cc
+++ b/mojo/public/cpp/system/tests/macros_unittest.cc
@@ -67,6 +67,7 @@ static_assert(MOJO_ARRAYSIZE(kGlobalArray) == 5u,
TEST(MacrosCppTest, ArraySize) {
double local_array[4] = {6.7, 7.8, 8.9, 9.0};
+ MOJO_ALLOW_UNUSED_LOCAL(local_array);
EXPECT_EQ(4u, MOJO_ARRAYSIZE(local_array));
}
diff --git a/net/base/file_stream_context_win.cc b/net/base/file_stream_context_win.cc
index 3b942d3..369dfc1a 100644
--- a/net/base/file_stream_context_win.cc
+++ b/net/base/file_stream_context_win.cc
@@ -68,14 +68,13 @@ int FileStream::Context::Read(IOBuffer* buf,
if (!ReadFile(file_.GetPlatformFile(), buf->data(), buf_len,
&bytes_read, &io_context_.overlapped)) {
IOResult error = IOResult::FromOSError(GetLastError());
- if (error.os_error == ERROR_IO_PENDING) {
- IOCompletionIsPending(callback, buf);
- } else if (error.os_error == ERROR_HANDLE_EOF) {
+ if (error.os_error == ERROR_HANDLE_EOF)
return 0; // Report EOF by returning 0 bytes read.
- } else {
+ if (error.os_error == ERROR_IO_PENDING)
+ IOCompletionIsPending(callback, buf);
+ else
LOG(WARNING) << "ReadFile failed: " << error.os_error;
- }
- return error.result;
+ return static_cast<int>(error.result);
}
IOCompletionIsPending(callback, buf);
@@ -89,12 +88,11 @@ int FileStream::Context::Write(IOBuffer* buf,
if (!WriteFile(file_.GetPlatformFile(), buf->data(), buf_len,
&bytes_written, &io_context_.overlapped)) {
IOResult error = IOResult::FromOSError(GetLastError());
- if (error.os_error == ERROR_IO_PENDING) {
+ if (error.os_error == ERROR_IO_PENDING)
IOCompletionIsPending(callback, buf);
- } else {
+ else
LOG(WARNING) << "WriteFile failed: " << error.os_error;
- }
- return error.result;
+ return static_cast<int>(error.result);
}
IOCompletionIsPending(callback, buf);
@@ -149,7 +147,7 @@ void FileStream::Context::OnIOCompleted(
result = 0;
} else if (error) {
IOResult error_result = IOResult::FromOSError(error);
- result = error_result.result;
+ result = static_cast<int>(error_result.result);
} else {
result = bytes_read;
IncrementOffset(&io_context_.overlapped, bytes_read);
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index fe63820..9426da5 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -300,14 +300,13 @@ base::Value* NetLogProcTaskFailedCallback(uint32 attempt_number,
#elif defined(OS_WIN)
// Map the error code to a human-readable string.
LPWSTR error_string = NULL;
- int size = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM,
- 0, // Use the internal message table.
- os_error,
- 0, // Use default language.
- (LPWSTR)&error_string,
- 0, // Buffer size.
- 0); // Arguments (unused).
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ 0, // Use the internal message table.
+ os_error,
+ 0, // Use default language.
+ (LPWSTR)&error_string,
+ 0, // Buffer size.
+ 0); // Arguments (unused).
dict->SetString("os_error_string", base::WideToUTF8(error_string));
LocalFree(error_string);
#endif
diff --git a/net/quic/quic_unacked_packet_map_test.cc b/net/quic/quic_unacked_packet_map_test.cc
index ca87e491..7840495 100644
--- a/net/quic/quic_unacked_packet_map_test.cc
+++ b/net/quic/quic_unacked_packet_map_test.cc
@@ -196,8 +196,8 @@ TEST_F(QuicUnackedPacketMapTest, RetransmittedPacket) {
unacked_packets_.RemoveFromInFlight(2);
QuicPacketSequenceNumber unacked2[] = { 1 };
- VerifyUnackedPackets(unacked, arraysize(unacked2));
- VerifyInFlightPackets(unacked, arraysize(unacked2));
+ VerifyUnackedPackets(unacked2, arraysize(unacked2));
+ VerifyInFlightPackets(unacked2, arraysize(unacked2));
VerifyRetransmittablePackets(nullptr, 0);
unacked_packets_.RemoveFromInFlight(1);
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index c474a0b..5bcc146 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -258,7 +258,7 @@ TEST_F(SOCKS5ClientSocketTest, PartialReadWrites) {
const char partial1[] = { 0x05, 0x01 };
const char partial2[] = { 0x00 };
MockWrite data_writes[] = {
- MockWrite(ASYNC, arraysize(partial1)),
+ MockWrite(ASYNC, partial1, arraysize(partial1)),
MockWrite(ASYNC, partial2, arraysize(partial2)),
MockWrite(ASYNC, kOkRequest, arraysize(kOkRequest)) };
MockRead data_reads[] = {
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index fbb84f8..01bffe6 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -287,12 +287,12 @@ TEST_F(SOCKSClientSocketTest, PartialClientWrites) {
const char kSOCKSPartialRequest2[] = { 0x00, 0x50, 127, 0, 0, 1, 0 };
MockWrite data_writes[] = {
- MockWrite(ASYNC, arraysize(kSOCKSPartialRequest1)),
+ MockWrite(ASYNC, kSOCKSPartialRequest1, arraysize(kSOCKSPartialRequest1)),
// simulate some empty writes
MockWrite(ASYNC, 0),
MockWrite(ASYNC, 0),
- MockWrite(ASYNC, kSOCKSPartialRequest2,
- arraysize(kSOCKSPartialRequest2)) };
+ MockWrite(ASYNC, kSOCKSPartialRequest2, arraysize(kSOCKSPartialRequest2)),
+ };
MockRead data_reads[] = {
MockRead(ASYNC, kSOCKSOkReply, arraysize(kSOCKSOkReply)) };
CapturingNetLog log;
diff --git a/net/tools/dump_cache/cache_dumper.cc b/net/tools/dump_cache/cache_dumper.cc
index 0ce46a9..99e3dcd 100644
--- a/net/tools/dump_cache/cache_dumper.cc
+++ b/net/tools/dump_cache/cache_dumper.cc
@@ -45,7 +45,6 @@ bool SafeCreateDirectory(const base::FilePath& path) {
#ifdef WIN32_LARGE_FILENAME_SUPPORT
// Due to large paths on windows, it can't simply do a
// CreateDirectory("a/b/c"). Instead, create each subdirectory manually.
- bool rv = false;
std::wstring::size_type pos(0);
std::wstring backslash(L"\\");
diff --git a/ui/base/dragdrop/os_exchange_data_win_unittest.cc b/ui/base/dragdrop/os_exchange_data_win_unittest.cc
index 1040ecf..0104307 100644
--- a/ui/base/dragdrop/os_exchange_data_win_unittest.cc
+++ b/ui/base/dragdrop/os_exchange_data_win_unittest.cc
@@ -49,8 +49,6 @@ TEST(OSExchangeDataWinTest, StringDataWritingViaCOM) {
STGMEDIUM medium;
medium.tymed = TYMED_HGLOBAL;
HGLOBAL glob = GlobalAlloc(GPTR, sizeof(wchar_t) * (input.size() + 1));
- size_t stringsz = input.size();
- SIZE_T sz = GlobalSize(glob);
base::win::ScopedHGlobal<wchar_t*> global_lock(glob);
wchar_t* buffer_handle = global_lock.get();
wcscpy_s(buffer_handle, input.size() + 1, input.c_str());
@@ -87,8 +85,6 @@ TEST(OSExchangeDataWinTest, RemoveData) {
medium.tymed = TYMED_HGLOBAL;
{
HGLOBAL glob = GlobalAlloc(GPTR, sizeof(wchar_t) * (input.size() + 1));
- size_t stringsz = input.size();
- SIZE_T sz = GlobalSize(glob);
base::win::ScopedHGlobal<wchar_t*> global_lock(glob);
wchar_t* buffer_handle = global_lock.get();
wcscpy_s(buffer_handle, input.size() + 1, input.c_str());
@@ -99,8 +95,6 @@ TEST(OSExchangeDataWinTest, RemoveData) {
// This should clobber the existing data.
{
HGLOBAL glob = GlobalAlloc(GPTR, sizeof(wchar_t) * (input2.size() + 1));
- size_t stringsz = input2.size();
- SIZE_T sz = GlobalSize(glob);
base::win::ScopedHGlobal<wchar_t*> global_lock(glob);
wchar_t* buffer_handle = global_lock.get();
wcscpy_s(buffer_handle, input2.size() + 1, input2.c_str());
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index caddd70..a3930f2 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -282,11 +282,6 @@ class NativeMenuWin::MenuHostWindow {
state = draw_item_struct->itemState & ODS_SELECTED ?
NativeTheme::kHovered : NativeTheme::kNormal;
}
- int height =
- draw_item_struct->rcItem.bottom - draw_item_struct->rcItem.top;
- int icon_y = kItemTopMargin +
- (height - kItemTopMargin - kItemBottomMargin -
- config.check_height) / 2;
gfx::Canvas canvas(gfx::Size(config.check_width, config.check_height),
1.0f,
false);
@@ -436,7 +431,6 @@ void NativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
// Command dispatch is done through WM_MENUCOMMAND, handled by the host
// window.
- HWND hwnd = host_window_->hwnd();
menu_to_select_ = NULL;
position_to_select_ = -1;
menu_to_select_factory_.InvalidateWeakPtrs();
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 49ccb97..f35b155 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -147,11 +147,10 @@ LRESULT CALLBACK MoveLoopMouseWatcher::KeyHook(int n_code,
if (n_code == HC_ACTION && w_param == VK_ESCAPE) {
if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
int value = TRUE;
- HRESULT result = DwmSetWindowAttribute(
- instance_->host_->hwnd(),
- DWMWA_TRANSITIONS_FORCEDISABLED,
- &value,
- sizeof(value));
+ DwmSetWindowAttribute(instance_->host_->hwnd(),
+ DWMWA_TRANSITIONS_FORCEDISABLED,
+ &value,
+ sizeof(value));
}
if (instance_->hide_on_escape_)
instance_->host_->Hide();
@@ -1134,7 +1133,7 @@ void HWNDMessageHandler::ResetWindowRegion(bool force, bool redraw) {
// Changing the window region is going to force a paint. Only change the
// window region if the region really differs.
base::win::ScopedRegion current_rgn(CreateRectRgn(0, 0, 0, 0));
- int current_rgn_result = GetWindowRgn(hwnd(), current_rgn);
+ GetWindowRgn(hwnd(), current_rgn);
RECT window_rect;
GetWindowRect(hwnd(), &window_rect);
diff --git a/ui/wm/core/nested_accelerator_controller_unittest.cc b/ui/wm/core/nested_accelerator_controller_unittest.cc
index ae8f5f5..4e55d4f 100644
--- a/ui/wm/core/nested_accelerator_controller_unittest.cc
+++ b/ui/wm/core/nested_accelerator_controller_unittest.cc
@@ -83,7 +83,6 @@ void DispatchKeyReleaseA(aura::Window* root_window) {
aura::WindowTreeHost* host = root_window->GetHost();
HWND hwnd = host->GetAcceleratedWidget();
::PostMessage(hwnd, WM_KEYDOWN, ui::VKEY_A, 0);
- MSG native_event_up = {NULL, WM_KEYUP, ui::VKEY_A, 0};
::PostMessage(hwnd, WM_KEYUP, ui::VKEY_A, 0);
#elif defined(USE_X11)
ui::ScopedXI2Event native_event;
diff --git a/win8/delegate_execute/crash_server_init.cc b/win8/delegate_execute/crash_server_init.cc
index 646c57b..1272652 100644
--- a/win8/delegate_execute/crash_server_init.cc
+++ b/win8/delegate_execute/crash_server_init.cc
@@ -68,7 +68,7 @@ namespace delegate_execute {
scoped_ptr<google_breakpad::ExceptionHandler> InitializeCrashReporting() {
wchar_t temp_path[MAX_PATH + 1] = {0};
- DWORD path_len = ::GetTempPath(MAX_PATH, temp_path);
+ ::GetTempPath(MAX_PATH, temp_path);
base::string16 pipe_name;
pipe_name = kGoogleUpdatePipeName;
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc
index d0530bd..2e8b1cb 100644
--- a/win8/metro_driver/chrome_app_view_ash.cc
+++ b/win8/metro_driver/chrome_app_view_ash.cc
@@ -284,7 +284,7 @@ void RunMessageLoop(winui::Core::ICoreDispatcher* dispatcher) {
// 1 - User action like ALT-F4.
// 2 - Calling ICoreApplicationExit::Exit().
// 3- Posting WM_CLOSE to the core window.
- HRESULT hr = dispatcher->ProcessEvents(
+ dispatcher->ProcessEvents(
winui::Core::CoreProcessEventsOption
::CoreProcessEventsOption_ProcessUntilQuit);
@@ -775,7 +775,7 @@ void ChromeAppViewAsh::OnOpenURLOnDesktop(const base::FilePath& shortcut,
sei.lpFile = file.c_str();
sei.lpDirectory = L"";
sei.lpParameters = url.c_str();
- BOOL result = ShellExecuteEx(&sei);
+ ShellExecuteEx(&sei);
}
void ChromeAppViewAsh::OnSetCursor(HCURSOR cursor) {