Title: [263906] trunk/Source
Revision
263906
Author
[email protected]
Date
2020-07-03 13:30:58 -0700 (Fri, 03 Jul 2020)

Log Message

Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
https://bugs.webkit.org/show_bug.cgi?id=213931

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:
Add -Wliteral-conversion.
Source/WebCore:

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw):
Fix error due to passing a double when a uint8_t was expected. This probably means
that the debug borders looked wrong for a little bit, but should now be back to
their transparent splendor.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (263905 => 263906)


--- trunk/Source/_javascript_Core/ChangeLog	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-07-03 20:30:58 UTC (rev 263906)
@@ -1,3 +1,13 @@
+2020-07-03  Sam Weinig  <[email protected]>
+
+        Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
+        https://bugs.webkit.org/show_bug.cgi?id=213931
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        Add -Wliteral-conversion.
+
 2020-07-03  Yusuke Suzuki  <[email protected]>
 
         [JSC] Add exception checks before and after viewWithUnderlyingString

Modified: trunk/Source/_javascript_Core/Configurations/Base.xcconfig (263905 => 263906)


--- trunk/Source/_javascript_Core/Configurations/Base.xcconfig	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/_javascript_Core/Configurations/Base.xcconfig	2020-07-03 20:30:58 UTC (rev 263906)
@@ -98,7 +98,7 @@
 GCC_WARN_UNUSED_VARIABLE = YES;
 CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion;
 
 HEADER_SEARCH_PATHS = . "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
 

Modified: trunk/Source/WTF/ChangeLog (263905 => 263906)


--- trunk/Source/WTF/ChangeLog	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WTF/ChangeLog	2020-07-03 20:30:58 UTC (rev 263906)
@@ -1,3 +1,13 @@
+2020-07-03  Sam Weinig  <[email protected]>
+
+        Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
+        https://bugs.webkit.org/show_bug.cgi?id=213931
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        Add -Wliteral-conversion.
+
 2020-07-03  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r263882.

Modified: trunk/Source/WTF/Configurations/Base.xcconfig (263905 => 263906)


--- trunk/Source/WTF/Configurations/Base.xcconfig	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WTF/Configurations/Base.xcconfig	2020-07-03 20:30:58 UTC (rev 263906)
@@ -97,7 +97,7 @@
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
 PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion;
 HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)$(WTF_INSTALL_PATH_PREFIX)/usr/local/include $(DSTROOT)$(WTF_INSTALL_PATH_PREFIX)/usr/local/include $(inherited);
 SYSTEM_HEADER_SEARCH_PATHS = $(SDK_DIR)$(WTF_INSTALL_PATH_PREFIX)/usr/local/include $(inherited);
 LIBRARY_SEARCH_PATHS = $(SDK_DIR)$(WTF_INSTALL_PATH_PREFIX)/usr/local/lib $(inherited);

Modified: trunk/Source/WebCore/ChangeLog (263905 => 263906)


--- trunk/Source/WebCore/ChangeLog	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebCore/ChangeLog	2020-07-03 20:30:58 UTC (rev 263906)
@@ -1,3 +1,19 @@
+2020-07-03  Sam Weinig  <[email protected]>
+
+        Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
+        https://bugs.webkit.org/show_bug.cgi?id=213931
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        Add -Wliteral-conversion.
+
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::draw):
+        Fix error due to passing a double when a uint8_t was expected. This probably means
+        that the debug borders looked wrong for a little bit, but should now be back to 
+        their transparent splendor.
+
 2020-07-03  Zalan Bujtas  <[email protected]>
 
         [LFC][TFC][Quirk] Inflow child box quirk vertical margins should collapse with table cell.

Modified: trunk/Source/WebCore/Configurations/Base.xcconfig (263905 => 263906)


--- trunk/Source/WebCore/Configurations/Base.xcconfig	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebCore/Configurations/Base.xcconfig	2020-07-03 20:30:58 UTC (rev 263906)
@@ -89,7 +89,7 @@
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wno-unknown-warning-option;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wno-unknown-warning-option -Wliteral-conversion;
 
 TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR_$(MACOSX_DEPLOYMENT_TARGET:base)$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
 TARGET_MAC_OS_X_VERSION_MAJOR_10_13 = 101300;

Modified: trunk/Source/WebCore/PAL/ChangeLog (263905 => 263906)


--- trunk/Source/WebCore/PAL/ChangeLog	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-07-03 20:30:58 UTC (rev 263906)
@@ -1,3 +1,13 @@
+2020-07-03  Sam Weinig  <[email protected]>
+
+        Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
+        https://bugs.webkit.org/show_bug.cgi?id=213931
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        Add -Wliteral-conversion.
+
 2020-07-03  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r263882.

Modified: trunk/Source/WebCore/PAL/Configurations/Base.xcconfig (263905 => 263906)


--- trunk/Source/WebCore/PAL/Configurations/Base.xcconfig	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebCore/PAL/Configurations/Base.xcconfig	2020-07-03 20:30:58 UTC (rev 263906)
@@ -88,7 +88,7 @@
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wno-unknown-warning-option;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wno-unknown-warning-option -Wliteral-conversion;
 
 TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR_$(MACOSX_DEPLOYMENT_TARGET:base)$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
 TARGET_MAC_OS_X_VERSION_MAJOR_10_13 = 101300;

Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (263905 => 263906)


--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2020-07-03 20:30:58 UTC (rev 263906)
@@ -237,7 +237,7 @@
 
         if (!frameHasDecodedNativeImageCompatibleWithOptionsAtIndex(m_currentFrame, m_currentSubsamplingLevel, DecodingOptions(DecodingMode::Asynchronous))) {
             if (m_showDebugBackground)
-                fillWithSolidColor(context, destRect, Color::yellow.colorWithAlpha(0.5), options.compositeOperator());
+                fillWithSolidColor(context, destRect, Color::yellow.colorWithAlpha(128), options.compositeOperator());
             return result;
         }
 
@@ -248,7 +248,7 @@
         ASSERT_IMPLIES(status == StartAnimationStatus::DecodingActive, (!m_currentFrame && !m_repetitionsComplete) || frameHasFullSizeNativeImageAtIndex(m_currentFrame, m_currentSubsamplingLevel));
 
         if (status == StartAnimationStatus::DecodingActive && m_showDebugBackground) {
-            fillWithSolidColor(context, destRect, Color::yellow.colorWithAlpha(0.5), options.compositeOperator());
+            fillWithSolidColor(context, destRect, Color::yellow.colorWithAlpha(128), options.compositeOperator());
             return result;
         }
         
@@ -266,7 +266,7 @@
         } else if (frameIsBeingDecoded) {
             // FIXME: instead of showing the yellow rectangle and returning we need to wait for this frame to finish decoding.
             if (m_showDebugBackground) {
-                fillWithSolidColor(context, destRect, Color::yellow.colorWithAlpha(0.5), options.compositeOperator());
+                fillWithSolidColor(context, destRect, Color::yellow.colorWithAlpha(128), options.compositeOperator());
                 LOG(Images, "BitmapImage::%s - %p - url: %s [waiting for async decoding to finish]", __FUNCTION__, this, sourceURL().string().utf8().data());
             }
             return ImageDrawResult::DidRequestDecoding;

Modified: trunk/Source/WebInspectorUI/ChangeLog (263905 => 263906)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-07-03 20:30:58 UTC (rev 263906)
@@ -1,3 +1,13 @@
+2020-07-03  Sam Weinig  <[email protected]>
+
+        Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
+        https://bugs.webkit.org/show_bug.cgi?id=213931
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        Add -Wliteral-conversion.
+
 2020-07-02  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: Allow selecting text of Response (DOM Tree)

Modified: trunk/Source/WebInspectorUI/Configurations/Base.xcconfig (263905 => 263906)


--- trunk/Source/WebInspectorUI/Configurations/Base.xcconfig	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebInspectorUI/Configurations/Base.xcconfig	2020-07-03 20:30:58 UTC (rev 263906)
@@ -64,7 +64,7 @@
 GCC_WARN_UNINITIALIZED_AUTOS = YES
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES
-WARNING_CFLAGS = -Wall -W -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wexit-time-destructors -Wvla;
+WARNING_CFLAGS = -Wall -W -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wexit-time-destructors -Wvla -Wliteral-conversion;
 
 ENGINEERING_BUILD_DEFINES = $(ENGINEERING_BUILD_DEFINES_$(ENGINEERING_BUILD));
 ENGINEERING_BUILD_DEFINES_1 = ENGINEERING_BUILD=1;

Modified: trunk/Source/WebKit/ChangeLog (263905 => 263906)


--- trunk/Source/WebKit/ChangeLog	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebKit/ChangeLog	2020-07-03 20:30:58 UTC (rev 263906)
@@ -1,3 +1,13 @@
+2020-07-03  Sam Weinig  <[email protected]>
+
+        Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
+        https://bugs.webkit.org/show_bug.cgi?id=213931
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        Add -Wliteral-conversion.
+
 2020-07-03  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r263882.

Modified: trunk/Source/WebKit/Configurations/Base.xcconfig (263905 => 263906)


--- trunk/Source/WebKit/Configurations/Base.xcconfig	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebKit/Configurations/Base.xcconfig	2020-07-03 20:30:58 UTC (rev 263906)
@@ -86,7 +86,7 @@
 GCC_WARN_UNUSED_VARIABLE = YES;
 OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR);
 PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion;
 
 TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR_$(MACOSX_DEPLOYMENT_TARGET:base)$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
 TARGET_MAC_OS_X_VERSION_MAJOR_10_13 = 101300;

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (263905 => 263906)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2020-07-03 20:30:58 UTC (rev 263906)
@@ -1,3 +1,13 @@
+2020-07-03  Sam Weinig  <[email protected]>
+
+        Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
+        https://bugs.webkit.org/show_bug.cgi?id=213931
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        Add -Wliteral-conversion.
+
 2020-07-01  Said Abou-Hallawa  <[email protected]>
 
         Allow the File object to be created with a replacement file

Modified: trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig (263905 => 263906)


--- trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig	2020-07-03 20:30:58 UTC (rev 263906)
@@ -88,7 +88,7 @@
 OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR);
 CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
 PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion;
 
 TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR_$(MACOSX_DEPLOYMENT_TARGET:base)$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
 TARGET_MAC_OS_X_VERSION_MAJOR_10_13 = 101300;

Modified: trunk/Source/bmalloc/ChangeLog (263905 => 263906)


--- trunk/Source/bmalloc/ChangeLog	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/bmalloc/ChangeLog	2020-07-03 20:30:58 UTC (rev 263906)
@@ -1,3 +1,13 @@
+2020-07-03  Sam Weinig  <[email protected]>
+
+        Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
+        https://bugs.webkit.org/show_bug.cgi?id=213931
+
+        Reviewed by Darin Adler.
+
+        * Configurations/Base.xcconfig:
+        Add -Wliteral-conversion.
+
 2020-06-30  Andy Estes  <[email protected]>
 
         [Xcode] Enable the "My Mac (Mac Catalyst)" destination in WebKit Xcode projects

Modified: trunk/Source/bmalloc/Configurations/Base.xcconfig (263905 => 263906)


--- trunk/Source/bmalloc/Configurations/Base.xcconfig	2020-07-03 20:06:51 UTC (rev 263905)
+++ trunk/Source/bmalloc/Configurations/Base.xcconfig	2020-07-03 20:30:58 UTC (rev 263906)
@@ -94,7 +94,7 @@
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
 PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion;
 
 TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR_$(MACOSX_DEPLOYMENT_TARGET:base)$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
 TARGET_MAC_OS_X_VERSION_MAJOR_10_13 = 101300;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to