Changeset 239201 in webkit


Ignore:
Timestamp:
Dec 14, 2018 12:09:53 AM (5 years ago)
Author:
Fujii Hironori
Message:

[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.

Location:
trunk/Source/WebCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r239192 r239201  
     12018-12-14  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win][Clang] Fix compilation warnings under Source/WebCore/platform/win
     4        https://bugs.webkit.org/show_bug.cgi?id=192693
     5
     6        Reviewed by Ross Kirsling.
     7
     8        No new tests, no behavior changes.
     9
     10        * platform/win/ClipboardUtilitiesWin.cpp: Reordered ClipboardDataItem members to match with the initializer list.
     11        * platform/win/CursorWin.cpp:
     12        (WebCore::loadCursorByName): Changed the argument type of 'name' to const char*.
     13        * platform/win/DefWndProcWindowClass.cpp:
     14        (WebCore::defWndProcWindowClassName): Removed an unused variable 'atom'.
     15        * platform/win/DragImageWin.cpp: Removed an unused variable 'MinDragLabelWidthBeforeClip'.
     16        * platform/win/PasteboardWin.cpp:
     17        (WebCore::createGlobalImageFileDescriptor): Removed an unused variable 'hr'.
     18        (WebCore::createGlobalHDropContent): Use reinterpret_cast to suppress warning.
     19        * platform/win/PlatformMouseEventWin.cpp:
     20        (WebCore::PlatformMouseEvent::PlatformMouseEvent): Reordered the initializer list.
     21        * platform/win/PopupMenuWin.cpp:
     22        (WebCore::PopupMenuWin::paint): Removed an unused variable 'itemCount'.
     23        * platform/win/PopupMenuWin.h: Marked override methods with 'override'.
     24        * platform/win/SSLKeyGeneratorWin.cpp:
     25        (WebCore::getSupportedKeySizes): Removed WebCore namespace prefix in WebCore namespace.
     26        (WebCore::signedPublicKeyAndChallengeString): Ditto.
     27        * platform/win/SearchPopupMenuDB.cpp:
     28        (WebCore::SearchPopupMenuDB::createPreparedStatement): Use ASSERT_UNUSED instead of ASSERT.
     29        * platform/win/StructuredExceptionHandlerSuppressor.h: Enclosed m_savedExceptionRegistration with #if defined(_M_IX86).
     30        * platform/win/SystemInfo.cpp:
     31        (WebCore::osVersionForUAString): Added default case.
     32
    1332018-12-13  Youenn Fablet  <youenn@apple.com>
    234
  • trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp

    r239092 r239201  
    696696
    697697struct ClipboardDataItem {
     698    FORMATETC* format;
    698699    GetStringFunction getString;
    699700    SetStringFunction setString;
    700     FORMATETC* format;
    701701
    702702    ClipboardDataItem(FORMATETC* format, GetStringFunction getString, SetStringFunction setString): format(format), getString(getString), setString(setString) { }
  • trunk/Source/WebCore/platform/win/CursorWin.cpp

    r239092 r239201  
    127127}
    128128
    129 static Ref<SharedCursor> loadCursorByName(char* name, int x, int y)
     129static Ref<SharedCursor> loadCursorByName(const char* name, int x, int y)
    130130{
    131131    IntPoint hotSpot(x, y);
  • trunk/Source/WebCore/platform/win/DefWndProcWindowClass.cpp

    r239092 r239201  
    4646const wchar_t* defWndProcWindowClassName()
    4747{
    48     static ATOM atom = registerClass();
     48    registerClass();
    4949    return className;
    5050}
  • trunk/Source/WebCore/platform/win/DragImageWin.cpp

    r239092 r239201  
    9797const float LabelBorderYOffset = 2;
    9898
    99 const float MinDragLabelWidthBeforeClip = 120;
    10099const float MaxDragLabelWidth = 200;
    101100const float MaxDragLabelStringWidth = (MaxDragLabelWidth - 2 * DragLabelBorderX);
  • trunk/Source/WebCore/platform/win/PasteboardWin.cpp

    r239092 r239201  
    889889    ASSERT(image->image()->data());
    890890
    891     HRESULT hr = S_OK;
    892891    String fsPath;
    893892    HGLOBAL memObj = GlobalAlloc(GPTR, sizeof(FILEGROUPDESCRIPTOR));
     
    10161015    dropFiles->pFiles = sizeof(DROPFILES);
    10171016    dropFiles->fWide = TRUE;
    1018     wcscpy((LPWSTR)(dropFiles + 1), filePath);   
     1017    wcscpy(reinterpret_cast<LPWSTR>(dropFiles + 1), filePath);
    10191018    GlobalUnlock(memObj);
    10201019
  • trunk/Source/WebCore/platform/win/PlatformMouseEventWin.cpp

    r229209 r239201  
    8585    , m_globalPosition(globalPositionForEvent(hWnd, lParam))
    8686    , m_clickCount(0)
     87    , m_modifierFlags(wParam)
    8788    , m_didActivateWebView(didActivateWebView)
    88     , m_modifierFlags(wParam)
    8989{
    9090    switch (message) {
  • trunk/Source/WebCore/platform/win/PopupMenuWin.cpp

    r239092 r239201  
    610610    GraphicsContext context(m_DC.get());
    611611
    612     int itemCount = client()->listSize();
    613 
    614     // listRect is the damageRect translated into the coordinates of the entire menu list (which is itemCount * m_itemHeight pixels tall)
     612    // listRect is the damageRect translated into the coordinates of the entire menu list (which is listSize * m_itemHeight pixels tall)
    615613    IntRect listRect = damageRect;
    616614    listRect.move(IntSize(0, m_scrollOffset * m_itemHeight));
     
    824822}
    825823
    826 const int smoothScrollAnimationDuration = 5000;
    827 
    828824LRESULT PopupMenuWin::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
    829825{
  • trunk/Source/WebCore/platform/win/PopupMenuWin.h

    r239151 r239201  
    4343    ~PopupMenuWin();
    4444
    45     virtual void show(const IntRect&, FrameView*, int index);
    46     virtual void hide();
    47     virtual void updateFromElement();
    48     virtual void disconnectClient();
     45    void show(const IntRect&, FrameView*, int index) override;
     46    void hide() override;
     47    void updateFromElement() override;
     48    void disconnectClient() override;
    4949
    5050    static LPCWSTR popupClassName();
  • trunk/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp

    r239092 r239201  
    3030namespace WebCore {
    3131
    32 void WebCore::getSupportedKeySizes(Vector<String>& v)
     32void getSupportedKeySizes(Vector<String>& v)
    3333{
    3434    // FIXME: Strings should be localizable.
     
    3636}
    3737
    38 String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& challenge, const URL& url)
     38String signedPublicKeyAndChallengeString(unsigned index, const String& challenge, const URL& url)
    3939{
    4040    String keyString;
     
    6363        CERT_KEYGEN_REQUEST_INFO requestInfo { };
    6464        requestInfo.dwVersion = CERT_KEYGEN_REQUEST_V1;
    65         requestInfo.pwszChallengeString = L"";
    6665        requestInfo.SubjectPublicKeyInfo = *pPubInfo;
    6766
     
    7372
    7473        CRYPT_ALGORITHM_IDENTIFIER signAlgo { };
    75         signAlgo.pszObjId = szOID_RSA_SHA1RSA;
     74        signAlgo.pszObjId = const_cast<char*>(szOID_RSA_SHA1RSA);
    7675
    7776        DWORD dwEncodedLength;
  • trunk/Source/WebCore/platform/win/SearchPopupMenuDB.cpp

    r237308 r239201  
    285285    auto statement = std::make_unique<SQLiteStatement>(m_database, sql);
    286286    int ret = statement->prepare();
    287     ASSERT(ret == SQLITE_OK);
     287    ASSERT_UNUSED(ret, ret == SQLITE_OK);
    288288    return statement;
    289289}
  • trunk/Source/WebCore/platform/win/StructuredExceptionHandlerSuppressor.h

    r155226 r239201  
    4646
    4747private:
     48#if defined(_M_IX86)
    4849    void* m_savedExceptionRegistration;
     50#endif
    4951};
    5052
  • trunk/Source/WebCore/platform/win/SystemInfo.cpp

    r173949 r239201  
    9898    case WindowsNT4:
    9999        return "WinNT4.0";
     100    default:
     101        break;
    100102    }
    101103
Note: See TracChangeset for help on using the changeset viewer.