WebKit Bugzilla
Attachment 357305 Details for
Bug 192693
: [Win][Clang] Fix compilation warnings under Source/WebCore/platform/win
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-192693-20181214170111.patch (text/plain), 11.90 KB, created by
Fujii Hironori
on 2018-12-14 00:01:12 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-12-14 00:01:12 PST
Size:
11.90 KB
patch
obsolete
>Subversion Revision: 239200 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4c6c381e5b6a47bb82af01e10453e673484f2eaf..61c762ae8053bbdf2c02c955b78e0dadb1b8bdab 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,35 @@ >+2018-12-13 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][Clang] Fix compilation warnings under Source/WebCore/platform/win >+ https://bugs.webkit.org/show_bug.cgi?id=192693 >+ >+ Reviewed by Ross Kirsling. >+ >+ No new tests, no behavior changes. >+ >+ * platform/win/ClipboardUtilitiesWin.cpp: Reordered ClipboardDataItem members to match with the initializer list. >+ * platform/win/CursorWin.cpp: >+ (WebCore::loadCursorByName): Changed the argument type of 'name' to const char*. >+ * platform/win/DefWndProcWindowClass.cpp: >+ (WebCore::defWndProcWindowClassName): Removed an unused variable 'atom'. >+ * platform/win/DragImageWin.cpp: Removed an unused variable 'MinDragLabelWidthBeforeClip'. >+ * platform/win/PasteboardWin.cpp: >+ (WebCore::createGlobalImageFileDescriptor): Removed an unused variable 'hr'. >+ (WebCore::createGlobalHDropContent): Use reinterpret_cast to suppress warning. >+ * platform/win/PlatformMouseEventWin.cpp: >+ (WebCore::PlatformMouseEvent::PlatformMouseEvent): Reordered the initializer list. >+ * platform/win/PopupMenuWin.cpp: >+ (WebCore::PopupMenuWin::paint): Removed an unused variable 'itemCount'. >+ * platform/win/PopupMenuWin.h: Marked override methods with 'override'. >+ * platform/win/SSLKeyGeneratorWin.cpp: >+ (WebCore::getSupportedKeySizes): Removed WebCore namespace prefix in WebCore namespace. >+ (WebCore::signedPublicKeyAndChallengeString): Ditto. >+ * platform/win/SearchPopupMenuDB.cpp: >+ (WebCore::SearchPopupMenuDB::createPreparedStatement): Use ASSERT_UNUSED instead of ASSERT. >+ * platform/win/StructuredExceptionHandlerSuppressor.h: Enclosed m_savedExceptionRegistration with #if defined(_M_IX86). >+ * platform/win/SystemInfo.cpp: >+ (WebCore::osVersionForUAString): Added default case. >+ > 2018-12-13 Youenn Fablet <youenn@apple.com> > > RTCRtpTransceiver.stopped should be true when applying a remote description with the corresponding m section rejected >diff --git a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp >index 4c52bc0fe915c5256d6b502a967b8246018164cd..0e4080b85676a0a461bbf96ba173235f5b7db63c 100644 >--- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp >+++ b/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp >@@ -695,9 +695,9 @@ typedef void (*GetStringFunction)(IDataObject*, FORMATETC*, Vector<String>&); > typedef void (*SetStringFunction)(IDataObject*, FORMATETC*, const Vector<String>&); > > struct ClipboardDataItem { >+ FORMATETC* format; > GetStringFunction getString; > SetStringFunction setString; >- FORMATETC* format; > > ClipboardDataItem(FORMATETC* format, GetStringFunction getString, SetStringFunction setString): format(format), getString(getString), setString(setString) { } > }; >diff --git a/Source/WebCore/platform/win/CursorWin.cpp b/Source/WebCore/platform/win/CursorWin.cpp >index d5c1f3fce664e17976f23b4ce7ebc5f5ee4bcd84..f52ba20639d259818f3bb61eb7282360cdd7d1bb 100644 >--- a/Source/WebCore/platform/win/CursorWin.cpp >+++ b/Source/WebCore/platform/win/CursorWin.cpp >@@ -126,7 +126,7 @@ static Ref<SharedCursor> loadSharedCursor(HINSTANCE hInstance, LPCWSTR lpCursorN > return SharedCursor::create(::LoadCursorW(hInstance, lpCursorName)); > } > >-static Ref<SharedCursor> loadCursorByName(char* name, int x, int y) >+static Ref<SharedCursor> loadCursorByName(const char* name, int x, int y) > { > IntPoint hotSpot(x, y); > RefPtr<Image> cursorImage(Image::loadPlatformResource(name)); >diff --git a/Source/WebCore/platform/win/DefWndProcWindowClass.cpp b/Source/WebCore/platform/win/DefWndProcWindowClass.cpp >index faeb6697596725bcf777497fb12cdd6c96bc8250..b8de42c99628b9dba36156b3c78300de89bea19c 100644 >--- a/Source/WebCore/platform/win/DefWndProcWindowClass.cpp >+++ b/Source/WebCore/platform/win/DefWndProcWindowClass.cpp >@@ -45,7 +45,7 @@ static ATOM registerClass() > > const wchar_t* defWndProcWindowClassName() > { >- static ATOM atom = registerClass(); >+ registerClass(); > return className; > } > >diff --git a/Source/WebCore/platform/win/DragImageWin.cpp b/Source/WebCore/platform/win/DragImageWin.cpp >index 8363e1773a0a5f3b118080387896aaf6efbc4145..1255480b40a26a2418fa23a6b10de68644b9de61 100644 >--- a/Source/WebCore/platform/win/DragImageWin.cpp >+++ b/Source/WebCore/platform/win/DragImageWin.cpp >@@ -96,7 +96,6 @@ const float DragLabelBorderY = 2; > const float DragLabelRadius = 5; > const float LabelBorderYOffset = 2; > >-const float MinDragLabelWidthBeforeClip = 120; > const float MaxDragLabelWidth = 200; > const float MaxDragLabelStringWidth = (MaxDragLabelWidth - 2 * DragLabelBorderX); > >diff --git a/Source/WebCore/platform/win/PasteboardWin.cpp b/Source/WebCore/platform/win/PasteboardWin.cpp >index f4565ce05f68c86572e68b09e53d5bb10073c07f..a5fd930ae91b917b9cba0864bba5534ecb2c1e13 100644 >--- a/Source/WebCore/platform/win/PasteboardWin.cpp >+++ b/Source/WebCore/platform/win/PasteboardWin.cpp >@@ -888,7 +888,6 @@ static HGLOBAL createGlobalImageFileDescriptor(const String& url, const String& > ASSERT_ARG(image, image); > ASSERT(image->image()->data()); > >- HRESULT hr = S_OK; > String fsPath; > HGLOBAL memObj = GlobalAlloc(GPTR, sizeof(FILEGROUPDESCRIPTOR)); > if (!memObj) >@@ -1015,7 +1014,7 @@ static HGLOBAL createGlobalHDropContent(const URL& url, String& fileName, Shared > > dropFiles->pFiles = sizeof(DROPFILES); > dropFiles->fWide = TRUE; >- wcscpy((LPWSTR)(dropFiles + 1), filePath); >+ wcscpy(reinterpret_cast<LPWSTR>(dropFiles + 1), filePath); > GlobalUnlock(memObj); > > return memObj; >diff --git a/Source/WebCore/platform/win/PlatformMouseEventWin.cpp b/Source/WebCore/platform/win/PlatformMouseEventWin.cpp >index a50b420ba138f25199f75de0264fb81709564971..f8b12d2df67227c67c133ee0736f0f61307b523b 100644 >--- a/Source/WebCore/platform/win/PlatformMouseEventWin.cpp >+++ b/Source/WebCore/platform/win/PlatformMouseEventWin.cpp >@@ -84,8 +84,8 @@ PlatformMouseEvent::PlatformMouseEvent(HWND hWnd, UINT message, WPARAM wParam, L > , m_position(positionForEvent(hWnd, lParam)) > , m_globalPosition(globalPositionForEvent(hWnd, lParam)) > , m_clickCount(0) >- , m_didActivateWebView(didActivateWebView) > , m_modifierFlags(wParam) >+ , m_didActivateWebView(didActivateWebView) > { > switch (message) { > case WM_LBUTTONDOWN: >diff --git a/Source/WebCore/platform/win/PopupMenuWin.cpp b/Source/WebCore/platform/win/PopupMenuWin.cpp >index 35bc4e79bf96539976344e724827a0562a625c6d..522a3408eb4a4b223f67607fa1391dff0a9af766 100644 >--- a/Source/WebCore/platform/win/PopupMenuWin.cpp >+++ b/Source/WebCore/platform/win/PopupMenuWin.cpp >@@ -609,9 +609,7 @@ void PopupMenuWin::paint(const IntRect& damageRect, HDC hdc) > > GraphicsContext context(m_DC.get()); > >- int itemCount = client()->listSize(); >- >- // listRect is the damageRect translated into the coordinates of the entire menu list (which is itemCount * m_itemHeight pixels tall) >+ // listRect is the damageRect translated into the coordinates of the entire menu list (which is listSize * m_itemHeight pixels tall) > IntRect listRect = damageRect; > listRect.move(IntSize(0, m_scrollOffset * m_itemHeight)); > >@@ -823,8 +821,6 @@ LRESULT CALLBACK PopupMenuWin::PopupMenuWndProc(HWND hWnd, UINT message, WPARAM > return ::DefWindowProc(hWnd, message, wParam, lParam); > } > >-const int smoothScrollAnimationDuration = 5000; >- > LRESULT PopupMenuWin::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) > { > LRESULT lResult = 0; >diff --git a/Source/WebCore/platform/win/PopupMenuWin.h b/Source/WebCore/platform/win/PopupMenuWin.h >index efd8ff86f026ba35e973c4b00725c5b3722bec38..363a0a3ab5d5a4c2442e6fa4f59bb400f31cbfec 100644 >--- a/Source/WebCore/platform/win/PopupMenuWin.h >+++ b/Source/WebCore/platform/win/PopupMenuWin.h >@@ -42,10 +42,10 @@ public: > PopupMenuWin(PopupMenuClient*); > ~PopupMenuWin(); > >- virtual void show(const IntRect&, FrameView*, int index); >- virtual void hide(); >- virtual void updateFromElement(); >- virtual void disconnectClient(); >+ void show(const IntRect&, FrameView*, int index) override; >+ void hide() override; >+ void updateFromElement() override; >+ void disconnectClient() override; > > static LPCWSTR popupClassName(); > >diff --git a/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp b/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp >index df35353a6cb80dd648dfd27f56b06a57cc8be1e8..fd6806efd93f6f66b58099fc50a83168c652915d 100644 >--- a/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp >+++ b/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp >@@ -29,13 +29,13 @@ > > namespace WebCore { > >-void WebCore::getSupportedKeySizes(Vector<String>& v) >+void getSupportedKeySizes(Vector<String>& v) > { > // FIXME: Strings should be localizable. > v.append("High Grade"); > } > >-String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& challenge, const URL& url) >+String signedPublicKeyAndChallengeString(unsigned index, const String& challenge, const URL& url) > { > String keyString; > >@@ -62,7 +62,6 @@ String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& > > CERT_KEYGEN_REQUEST_INFO requestInfo { }; > requestInfo.dwVersion = CERT_KEYGEN_REQUEST_V1; >- requestInfo.pwszChallengeString = L""; > requestInfo.SubjectPublicKeyInfo = *pPubInfo; > > String localChallenge = challenge; >@@ -72,7 +71,7 @@ String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& > requestInfo.pwszChallengeString = const_cast<wchar_t*>(localChallengeWide.data()); > > CRYPT_ALGORITHM_IDENTIFIER signAlgo { }; >- signAlgo.pszObjId = szOID_RSA_SHA1RSA; >+ signAlgo.pszObjId = const_cast<char*>(szOID_RSA_SHA1RSA); > > DWORD dwEncodedLength; > if (!CryptSignAndEncodeCertificate(hContext, AT_KEYEXCHANGE, X509_ASN_ENCODING, X509_KEYGEN_REQUEST_TO_BE_SIGNED, &requestInfo, &signAlgo, 0, 0, &dwEncodedLength)) >diff --git a/Source/WebCore/platform/win/SearchPopupMenuDB.cpp b/Source/WebCore/platform/win/SearchPopupMenuDB.cpp >index 1b8a4b880319c34a192a15bf0ab7dd18879d2f61..9e6e4c52d7b9838a1f07bdd59f409d8165fe5666 100644 >--- a/Source/WebCore/platform/win/SearchPopupMenuDB.cpp >+++ b/Source/WebCore/platform/win/SearchPopupMenuDB.cpp >@@ -284,7 +284,7 @@ std::unique_ptr<SQLiteStatement> SearchPopupMenuDB::createPreparedStatement(cons > { > auto statement = std::make_unique<SQLiteStatement>(m_database, sql); > int ret = statement->prepare(); >- ASSERT(ret == SQLITE_OK); >+ ASSERT_UNUSED(ret, ret == SQLITE_OK); > return statement; > } > >diff --git a/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.h b/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.h >index 19168dd5f42699e31e5923f52d3549ff4754eda4..1b8c0c02bad26f497bcdf098c3d0176689468135 100644 >--- a/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.h >+++ b/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.h >@@ -45,7 +45,9 @@ public: > ~StructuredExceptionHandlerSuppressor(); > > private: >+#if defined(_M_IX86) > void* m_savedExceptionRegistration; >+#endif > }; > > } // namespace WebCore >diff --git a/Source/WebCore/platform/win/SystemInfo.cpp b/Source/WebCore/platform/win/SystemInfo.cpp >index 44398e5574da7e2691795d3d9841388a54cbf729..70f6c1dcdebd6e4db8052f2a911f70621ab247d4 100644 >--- a/Source/WebCore/platform/win/SystemInfo.cpp >+++ b/Source/WebCore/platform/win/SystemInfo.cpp >@@ -97,6 +97,8 @@ static String osVersionForUAString() > return "Windows 98; Win 9x 4.90"; > case WindowsNT4: > return "WinNT4.0"; >+ default: >+ break; > } > > const char* familyName = (version >= WindowsNT3) ? "Windows NT " : "Windows CE ";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192693
:
357299
| 357305