Changeset 245179 in webkit


Ignore:
Timestamp:
May 10, 2019 11:03:56 AM (5 years ago)
Author:
Michael Catanzaro
Message:

Fix a bunch of compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=197785

Reviewed by Don Olmstead.

Source/ThirdParty/ANGLE:

Add compiler flags to suppress various warnings triggered by the new version of ANGLE.

  • CMakeLists.txt:

Source/WebCore:

  • CMakeLists.txt: WebCoreTestSupport should accept extra SYSTEM includes.
  • PlatformGTK.cmake: GTK includes should be added to SYSTEM headers to avoid warnings.
  • inspector/InspectorCanvas.cpp: Add preprocessor guards to fix unused function warning.
  • rendering/RenderLayer.cpp: Fix unused variable warning.

(WebCore::RenderLayer::updateClipRects):

Source/WebKit:

Guard Cocoa-specific format modifier to avoid -Wformat warning.

  • NetworkProcess/AdClickAttributionManager.cpp:

(WebKit::AdClickAttributionManager::fireConversionRequest):

Tools:

Add preprocessor guards to avoid -Wunused-function warnings.

  • TestWebKitAPI/Tests/WebCore/FloatRect.cpp:
  • TestWebKitAPI/Tests/WebCore/IntRect.cpp:
  • TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/CMakeLists.txt

    r245088 r245179  
    150150
    151151if (COMPILER_IS_GCC_OR_CLANG)
    152     WEBKIT_ADD_TARGET_CXX_FLAGS(ANGLE -Wno-cast-align -Wno-unused-parameter)
     152    WEBKIT_ADD_TARGET_CXX_FLAGS(ANGLE -Wno-cast-align
     153                                      -Wno-suggest-attribute=format
     154                                      -Wno-type-limits
     155                                      -Wno-undef
     156                                      -Wno-unused-parameter)
    153157endif ()
    154158
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r245155 r245179  
     12019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix a bunch of compiler warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=197785
     5
     6        Reviewed by Don Olmstead.
     7
     8        Add compiler flags to suppress various warnings triggered by the new version of ANGLE.
     9
     10        * CMakeLists.txt:
     11
    1122019-05-09  Don Olmstead  <don.olmstead@sony.com>
    213
  • trunk/Source/WebCore/CMakeLists.txt

    r245090 r245179  
    19731973target_include_directories(WebCoreTestSupport PUBLIC ${WebCoreTestSupport_INCLUDE_DIRECTORIES} ${WebCore_INCLUDE_DIRECTORIES})
    19741974target_include_directories(WebCoreTestSupport PRIVATE ${WebCoreTestSupport_PRIVATE_INCLUDE_DIRECTORIES} ${WebCore_PRIVATE_INCLUDE_DIRECTORIES})
    1975 target_include_directories(WebCoreTestSupport SYSTEM PUBLIC ${WebCore_SYSTEM_INCLUDE_DIRECTORIES})
     1975target_include_directories(WebCoreTestSupport SYSTEM PUBLIC ${WebCoreTestSupport_SYSTEM_INCLUDE_DIRECTORIES} ${WebCore_SYSTEM_INCLUDE_DIRECTORIES})
    19761976target_link_libraries(WebCoreTestSupport PRIVATE ${WebCoreTestSupport_LIBRARIES})
    19771977
  • trunk/Source/WebCore/ChangeLog

    r245175 r245179  
     12019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix a bunch of compiler warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=197785
     5
     6        Reviewed by Don Olmstead.
     7
     8        * CMakeLists.txt: WebCoreTestSupport should accept extra SYSTEM includes.
     9        * PlatformGTK.cmake: GTK includes should be added to SYSTEM headers to avoid warnings.
     10        * inspector/InspectorCanvas.cpp: Add preprocessor guards to fix unused function warning.
     11        * rendering/RenderLayer.cpp: Fix unused variable warning.
     12        (WebCore::RenderLayer::updateClipRects):
     13
    1142019-05-10  Antti Koivisto  <antti@apple.com>
    215
  • trunk/Source/WebCore/PlatformGTK.cmake

    r245088 r245179  
    215215
    216216list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE ${GTK_LIBRARIES})
    217 list(APPEND WebCoreTestSupport_INCLUDE_DIRECTORIES ${GTK_INCLUDE_DIRS})
     217list(APPEND WebCoreTestSupport_SYSTEM_INCLUDE_DIRECTORIES ${GTK_INCLUDE_DIRS})
    218218
    219219add_definitions(-DBUILDING_WEBKIT)
  • trunk/Source/WebCore/inspector/InspectorCanvas.cpp

    r244908 r245179  
    139139}
    140140
     141#if ENABLE(WEBGL)
    141142static bool shouldSnapshotWebGLAction(const String& name)
    142143{
     
    145146        || name == "drawElements";
    146147}
    147 
     148#endif
     149
     150#if ENABLE(WEBGL2)
    148151static bool shouldSnapshotWebGL2Action(const String& name)
    149152{
     
    154157        || name == "drawElementsInstanced";
    155158}
     159#endif
    156160
    157161void InspectorCanvas::recordAction(const String& name, Vector<RecordCanvasActionVariant>&& parameters)
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r245170 r245179  
    55015501    // For transformed layers, the root layer was shifted to be us, so there is no need to
    55025502    // examine the parent. We want to cache clip rects with us as the root.
    5503     if (auto* parentLayer = (clipRectsContext.rootLayer != this ? parent() : nullptr))
     5503    if (clipRectsContext.rootLayer != this && parent())
    55045504        parentClipRects = this->parentClipRects(clipRectsContext);
    55055505
  • trunk/Source/WebKit/ChangeLog

    r245178 r245179  
     12019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix a bunch of compiler warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=197785
     5
     6        Reviewed by Don Olmstead.
     7
     8        Guard Cocoa-specific format modifier to avoid -Wformat warning.
     9
     10        * NetworkProcess/AdClickAttributionManager.cpp:
     11        (WebKit::AdClickAttributionManager::fireConversionRequest):
     12
    1132019-05-10  Chris Fleizach  <cfleizach@apple.com>
    214
  • trunk/Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp

    r244818 r245179  
    182182
    183183    m_pingLoadFunction(WTFMove(loadParameters), [](const WebCore::ResourceError& error, const WebCore::ResourceResponse& response) {
     184#if PLATFORM(COCOA)
    184185        RELEASE_LOG_ERROR_IF(!error.isNull(), AdClickAttribution, "Received error: '%{public}s' for ad click attribution request.", error.localizedDescription().utf8().data());
     186#else
     187        RELEASE_LOG_ERROR_IF(!error.isNull(), AdClickAttribution, "Received error: '%s' for ad click attribution request.", error.localizedDescription().utf8().data());
     188#endif
    185189        UNUSED_PARAM(response);
    186190        UNUSED_PARAM(error);
  • trunk/Tools/ChangeLog

    r245176 r245179  
     12019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix a bunch of compiler warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=197785
     5
     6        Reviewed by Don Olmstead.
     7
     8        Add preprocessor guards to avoid -Wunused-function warnings.
     9
     10        * TestWebKitAPI/Tests/WebCore/FloatRect.cpp:
     11        * TestWebKitAPI/Tests/WebCore/IntRect.cpp:
     12        * TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
     13
    1142019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
    215
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/FloatRect.cpp

    r217521 r245179  
    604604}
    605605
     606#if USE(CG) || PLATFORM(WIN)
    606607static void checkCastRect(const WebCore::FloatRect& rect)
    607608{
     
    613614    EXPECT_FLOAT_EQ(40.0f, rect.height());
    614615}
     616#endif
    615617
    616618TEST(FloatRect, Casting)
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/IntRect.cpp

    r207708 r245179  
    482482}
    483483
     484#if USE(CG) || PLATFORM(WIN)
    484485static void checkCastRect(const WebCore::IntRect& rect)
    485486{
     
    491492    EXPECT_EQ(40, rect.height());
    492493}
     494#endif
    493495
    494496TEST(IntRect, Casting)
     
    585587}
    586588
     589#if USE(CG)
    587590static void checkEnclosingIntRect(const WebCore::IntRect& rect)
    588591{
     
    594597    EXPECT_EQ(41, rect.height());
    595598}
     599#endif
    596600
    597601TEST(IntRect, EnclosingIntRect)
  • trunk/Tools/TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp

    r234439 r245179  
    11881188}
    11891189
     1190#if USE(CA)
    11901191static void testTranslationMatrix(const WebCore::TransformationMatrix& matrix)
    11911192{
     
    12071208    EXPECT_DOUBLE_EQ(1.0, matrix.m44());
    12081209}
     1210#endif
    12091211
    12101212TEST(TransformationMatrix, Casting)
Note: See TracChangeset for help on using the changeset viewer.