diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 93e43661302e..a04a5a0eb25e 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -623,7 +623,9 @@ void NativeWindowViews::SetBackgroundColor(const std::string& color_name) { // Set the background color of native window. HBRUSH brush = CreateSolidBrush(skia::SkColorToCOLORREF(background_color)); ULONG_PTR previous_brush = SetClassLongPtr( - GetAcceleratedWidget(), GCLP_HBRBACKGROUND, (LONG)brush); + GetAcceleratedWidget(), + GCLP_HBRBACKGROUND, + reinterpret_cast(brush)); if (previous_brush) DeleteObject((HBRUSH)previous_brush); #endif diff --git a/atom/browser/ui/message_box_win.cc b/atom/browser/ui/message_box_win.cc index 5f49151c30ff..2c4ce54856d4 100644 --- a/atom/browser/ui/message_box_win.cc +++ b/atom/browser/ui/message_box_win.cc @@ -64,7 +64,8 @@ void MapToCommonID(const std::vector& buttons, (*button_flags) |= common.button; } else { // It is a custom button. - dialog_buttons->push_back({i + kIDStart, buttons[i].c_str()}); + dialog_buttons->push_back( + {static_cast(i + kIDStart), buttons[i].c_str()}); } } } @@ -135,7 +136,8 @@ int ShowMessageBoxUTF16(HWND parent, std::vector dialog_buttons; if (options & MESSAGE_BOX_NO_LINK) { for (size_t i = 0; i < buttons.size(); ++i) - dialog_buttons.push_back({i + kIDStart, buttons[i].c_str()}); + dialog_buttons.push_back( + {static_cast(i + kIDStart), buttons[i].c_str()}); } else { MapToCommonID(buttons, &id_map, &config.dwCommonButtons, &dialog_buttons); } diff --git a/atom/common/crash_reporter/win/crash_service.cc b/atom/common/crash_reporter/win/crash_service.cc index 58c7c38632ed..b3499bc09540 100644 --- a/atom/common/crash_reporter/win/crash_service.cc +++ b/atom/common/crash_reporter/win/crash_service.cc @@ -327,7 +327,7 @@ void CrashService::OnClientConnected(void* context, void CrashService::OnClientExited(void* context, const google_breakpad::ClientInfo* client_info) { - ProcessingLock lock; + ProcessingLock processing_lock; VLOG(1) << "client end. pid = " << client_info->pid(); CrashService* self = static_cast(context); ::InterlockedIncrement(&self->clients_terminated_); diff --git a/common.gypi b/common.gypi index 1088beb1b7b8..f00e4293ca42 100644 --- a/common.gypi +++ b/common.gypi @@ -62,7 +62,12 @@ 4232, # address of dllimport 'free' is not static, identity not guaranteed 4291, # no matching operator delete found 4295, # array is too small to include a terminating null character + 4311, # 'type cast': pointer truncation from 'void *const ' to 'unsigned long' 4389, # '==' : signed/unsigned mismatch + 4456, # declaration of 'm' hides previous local declaration + 4457, # declaration of 'message' hides function parameter + 4459, # declaration of 'wq' hides global declaration + 4477, # format string '%.*s' requires an argument of type 'int' 4505, # unreferenced local function has been removed 4701, # potentially uninitialized local variable 'sizew' used 4703, # potentially uninitialized local pointer variable 'req' used @@ -234,9 +239,12 @@ 4189, # local variable is initialized but not referenced 4201, # (uv.h) nameless struct/union 4267, # conversion from 'size_t' to 'int', possible loss of data + 4302, # (atldlgs.h) 'type cast': truncation from 'LPCTSTR' to 'WORD' + 4458, # (atldlgs.h) declaration of 'dwCommonButtons' hides class member 4503, # decorated name length exceeded, name was truncated 4800, # (v8.h) forcing value to bool 'true' or 'false' 4819, # The file contains a character that cannot be represented in the current code page + 4838, # (atlgdi.h) conversion from 'int' to 'UINT' requires a narrowing conversion 4996, # (atlapp.h) 'GetVersionExW': was declared deprecated ], },