Diff
Modified: trunk/Source/WebCore/ChangeLog (239200 => 239201)
--- trunk/Source/WebCore/ChangeLog 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/ChangeLog 2018-12-14 08:09:53 UTC (rev 239201)
@@ -1,3 +1,35 @@
+2018-12-14 Fujii Hironori <[email protected]>
+
+ [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 <[email protected]>
RTCRtpTransceiver.stopped should be true when applying a remote description with the corresponding m section rejected
Modified: trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -695,9 +695,9 @@
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) { }
};
Modified: trunk/Source/WebCore/platform/win/CursorWin.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/CursorWin.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/CursorWin.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -126,7 +126,7 @@
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));
Modified: trunk/Source/WebCore/platform/win/DefWndProcWindowClass.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/DefWndProcWindowClass.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/DefWndProcWindowClass.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -45,7 +45,7 @@
const wchar_t* defWndProcWindowClassName()
{
- static ATOM atom = registerClass();
+ registerClass();
return className;
}
Modified: trunk/Source/WebCore/platform/win/DragImageWin.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/DragImageWin.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/DragImageWin.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -96,7 +96,6 @@
const float DragLabelRadius = 5;
const float LabelBorderYOffset = 2;
-const float MinDragLabelWidthBeforeClip = 120;
const float MaxDragLabelWidth = 200;
const float MaxDragLabelStringWidth = (MaxDragLabelWidth - 2 * DragLabelBorderX);
Modified: trunk/Source/WebCore/platform/win/PasteboardWin.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/PasteboardWin.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/PasteboardWin.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -888,7 +888,6 @@
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 @@
dropFiles->pFiles = sizeof(DROPFILES);
dropFiles->fWide = TRUE;
- wcscpy((LPWSTR)(dropFiles + 1), filePath);
+ wcscpy(reinterpret_cast<LPWSTR>(dropFiles + 1), filePath);
GlobalUnlock(memObj);
return memObj;
Modified: trunk/Source/WebCore/platform/win/PlatformMouseEventWin.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/PlatformMouseEventWin.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/PlatformMouseEventWin.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -84,8 +84,8 @@
, m_position(positionForEvent(hWnd, lParam))
, m_globalPosition(globalPositionForEvent(hWnd, lParam))
, m_clickCount(0)
+ , m_modifierFlags(wParam)
, m_didActivateWebView(didActivateWebView)
- , m_modifierFlags(wParam)
{
switch (message) {
case WM_LBUTTONDOWN:
Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/PopupMenuWin.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -609,9 +609,7 @@
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 @@
return ::DefWindowProc(hWnd, message, wParam, lParam);
}
-const int smoothScrollAnimationDuration = 5000;
-
LRESULT PopupMenuWin::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
LRESULT lResult = 0;
Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.h (239200 => 239201)
--- trunk/Source/WebCore/platform/win/PopupMenuWin.h 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.h 2018-12-14 08:09:53 UTC (rev 239201)
@@ -42,10 +42,10 @@
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();
Modified: trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -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 @@
CERT_KEYGEN_REQUEST_INFO requestInfo { };
requestInfo.dwVersion = CERT_KEYGEN_REQUEST_V1;
- requestInfo.pwszChallengeString = L"";
requestInfo.SubjectPublicKeyInfo = *pPubInfo;
String localChallenge = challenge;
@@ -72,7 +71,7 @@
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))
Modified: trunk/Source/WebCore/platform/win/SearchPopupMenuDB.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/SearchPopupMenuDB.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/SearchPopupMenuDB.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -284,7 +284,7 @@
{
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;
}
Modified: trunk/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.h (239200 => 239201)
--- trunk/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.h 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.h 2018-12-14 08:09:53 UTC (rev 239201)
@@ -45,7 +45,9 @@
~StructuredExceptionHandlerSuppressor();
private:
+#if defined(_M_IX86)
void* m_savedExceptionRegistration;
+#endif
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/win/SystemInfo.cpp (239200 => 239201)
--- trunk/Source/WebCore/platform/win/SystemInfo.cpp 2018-12-14 07:54:59 UTC (rev 239200)
+++ trunk/Source/WebCore/platform/win/SystemInfo.cpp 2018-12-14 08:09:53 UTC (rev 239201)
@@ -97,6 +97,8 @@
return "Windows 98; Win 9x 4.90";
case WindowsNT4:
return "WinNT4.0";
+ default:
+ break;
}
const char* familyName = (version >= WindowsNT3) ? "Windows NT " : "Windows CE ";