summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-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
4 files changed, 5 insertions, 19 deletions
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;