Title: [254636] trunk/Tools
Revision
254636
Author
ddkil...@apple.com
Date
2020-01-15 14:04:45 -0800 (Wed, 15 Jan 2020)

Log Message

Enable -Wconditional-uninitialized in DumpRenderTree, WebKitTestRunner
<https://webkit.org/b/206269>
<rdar://problem/58589158>

Reviewed by Brent Fulgham.

* DumpRenderTree/mac/Configurations/Base.xcconfig:
(WARNING_CFLAGS): Add -Wconditional-uninitialized switch.
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):
Initialize `imageRef` stack variable to `nullptr`.
* WebKitTestRunner/Configurations/Base.xcconfig:
(WARNING_CFLAGS): Add -Wconditional-uninitialized switch.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (254635 => 254636)


--- trunk/Tools/ChangeLog	2020-01-15 22:03:10 UTC (rev 254635)
+++ trunk/Tools/ChangeLog	2020-01-15 22:04:45 UTC (rev 254636)
@@ -1,3 +1,19 @@
+2020-01-15  David Kilzer  <ddkil...@apple.com>
+
+        Enable -Wconditional-uninitialized in DumpRenderTree, WebKitTestRunner
+        <https://webkit.org/b/206269>
+        <rdar://problem/58589158>
+
+        Reviewed by Brent Fulgham.
+
+        * DumpRenderTree/mac/Configurations/Base.xcconfig:
+        (WARNING_CFLAGS): Add -Wconditional-uninitialized switch.
+        * DumpRenderTree/mac/UIDelegate.mm:
+        (-[UIDelegate webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):
+        Initialize `imageRef` stack variable to `nullptr`.
+        * WebKitTestRunner/Configurations/Base.xcconfig:
+        (WARNING_CFLAGS): Add -Wconditional-uninitialized switch.
+
 2020-01-15  Keith Miller  <keith_mil...@apple.com>
 
         Revert bytecode checkpoints since it breaks watch

Modified: trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig (254635 => 254636)


--- trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig	2020-01-15 22:03:10 UTC (rev 254635)
+++ trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig	2020-01-15 22:04:45 UTC (rev 254636)
@@ -80,7 +80,7 @@
 // FIXME: <http://webkit.org/b/118590> DumpRenderTree should build with -Wshorten-64-to-32
 GCC_WARN_64_TO_32_BIT_CONVERSION[arch=arm64*] = NO;
 GCC_WARN_64_TO_32_BIT_CONVERSION[arch=x86_64] = NO;
-WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef
+WARNING_CFLAGS = -Wall -W -Wconditional-uninitialized -Wno-unused-parameter -Wundef;
 
 DEBUG_DEFINES_debug = ;
 DEBUG_DEFINES_normal = NDEBUG;

Modified: trunk/Tools/DumpRenderTree/mac/UIDelegate.mm (254635 => 254636)


--- trunk/Tools/DumpRenderTree/mac/UIDelegate.mm	2020-01-15 22:03:10 UTC (rev 254635)
+++ trunk/Tools/DumpRenderTree/mac/UIDelegate.mm	2020-01-15 22:04:45 UTC (rev 254636)
@@ -389,7 +389,7 @@
     NSURL *firstURL = [NSURL fileURLWithPath:[NSString stringWithUTF8String:openPanelFiles[0].c_str()] relativeToURL:baseURL];
     NSString *displayString = firstURL.lastPathComponent;
     const std::vector<char>& iconData = gTestRunner->openPanelFilesMediaIcon();
-    CGImageRef imageRef;
+    CGImageRef imageRef = nullptr;
     if (!iconData.empty()) {
         RetainPtr<CFDataRef> dataRef = adoptCF(CFDataCreate(nullptr, (unsigned char *)iconData.data(), iconData.size()));
         RetainPtr<CGDataProviderRef> imageProviderRef = adoptCF(CGDataProviderCreateWithCFData(dataRef.get()));

Modified: trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig (254635 => 254636)


--- trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig	2020-01-15 22:03:10 UTC (rev 254635)
+++ trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig	2020-01-15 22:04:45 UTC (rev 254636)
@@ -72,7 +72,7 @@
 GCC_WARN_UNUSED_VARIABLE = YES
 GCC_WARN_64_TO_32_BIT_CONVERSION[arch=arm64*] = NO;
 GCC_WARN_64_TO_32_BIT_CONVERSION[arch=x86_64] = NO;
-WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef
+WARNING_CFLAGS = -Wall -W -Wconditional-uninitialized -Wno-unused-parameter -Wundef;
 GCC_PREFIX_HEADER = WebKitTestRunnerPrefix.h
 
 DEBUG_DEFINES_debug = ;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to