Title: [176910] trunk/Source/WebCore
Revision
176910
Author
[email protected]
Date
2014-12-06 13:04:35 -0800 (Sat, 06 Dec 2014)

Log Message

Fix build with newer versions of clang.
rdar://problem/18978689

Disable the "inconsistent missing override" warning due to our use of macros in SVG where it's hard to
know whether we can add an override or not.

Also, cast return values of +alloc to the right type, and add some casts for vector iterator arithmetic.

* Configurations/Base.xcconfig:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::guidForOriginAndName):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _stringForRange:attributed:]):
* editing/cocoa/HTMLConverter.mm:
(_shadowForShadowStyle):
(HTMLConverter::_addTableForElement):
* platform/graphics/SVGGlyph.cpp:
(WebCore::isCompatibleArabicForm):
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::createMix):
* platform/graphics/mac/FontMac.mm:
(WebCore::showLetterpressedGlyphsWithAdvances):
* platform/ios/PlatformSpeechSynthesizerIOS.mm:
(-[WebSpeechSynthesisWrapper speakUtterance:]):
* platform/ios/WebCoreMotionManager.mm:
(-[WebCoreMotionManager initializeOnMainThread]):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::spannedRows):
(WebCore::RenderTableSection::spannedColumns):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (176909 => 176910)


--- trunk/Source/WebCore/ChangeLog	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/ChangeLog	2014-12-06 21:04:35 UTC (rev 176910)
@@ -1,3 +1,35 @@
+2014-12-06  Anders Carlsson  <[email protected]>
+
+        Fix build with newer versions of clang.
+        rdar://problem/18978689
+
+        Disable the "inconsistent missing override" warning due to our use of macros in SVG where it's hard to
+        know whether we can add an override or not.
+
+        Also, cast return values of +alloc to the right type, and add some casts for vector iterator arithmetic.
+
+        * Configurations/Base.xcconfig:
+        * Modules/webdatabase/DatabaseBackendBase.cpp:
+        (WebCore::guidForOriginAndName):
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper _stringForRange:attributed:]):
+        * editing/cocoa/HTMLConverter.mm:
+        (_shadowForShadowStyle):
+        (HTMLConverter::_addTableForElement):
+        * platform/graphics/SVGGlyph.cpp:
+        (WebCore::isCompatibleArabicForm):
+        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
+        (WebCore::AudioSourceProviderAVFObjC::createMix):
+        * platform/graphics/mac/FontMac.mm:
+        (WebCore::showLetterpressedGlyphsWithAdvances):
+        * platform/ios/PlatformSpeechSynthesizerIOS.mm:
+        (-[WebSpeechSynthesisWrapper speakUtterance:]):
+        * platform/ios/WebCoreMotionManager.mm:
+        (-[WebCoreMotionManager initializeOnMainThread]):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::spannedRows):
+        (WebCore::RenderTableSection::spannedColumns):
+
 2014-12-06  [email protected]  <[email protected]>
 
         [WinCairo] Compile error, missing guard.

Modified: trunk/Source/WebCore/Configurations/Base.xcconfig (176909 => 176910)


--- trunk/Source/WebCore/Configurations/Base.xcconfig	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/Configurations/Base.xcconfig	2014-12-06 21:04:35 UTC (rev 176910)
@@ -84,7 +84,7 @@
 GCC_WARN_UNUSED_VARIABLE = YES;
 LINKER_DISPLAYS_MANGLED_NAMES = YES;
 PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -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;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -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 -Wno-inconsistent-missing-override;
 
 TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR);
 

Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp (176909 => 176910)


--- trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp	2014-12-06 21:04:35 UTC (rev 176910)
@@ -182,7 +182,6 @@
 {
     String stringID = origin + "/" + name;
 
-    typedef HashMap<String, int> IDGuidMap;
     static NeverDestroyed<HashMap<String, int>> map;
     DatabaseGuid guid = map.get().get(stringID);
     if (!guid) {

Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (176909 => 176910)


--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2014-12-06 21:04:35 UTC (rev 176910)
@@ -2040,7 +2040,7 @@
     
     NSArray* array = [self arrayOfTextForTextMarkers:[NSArray arrayWithObjects:startMarker, endMarker, nil] attributed:attributed];
     Class returnClass = attributed ? [NSMutableAttributedString class] : [NSMutableString class];
-    id returnValue = [[[returnClass alloc] init] autorelease];
+    id returnValue = [[(NSString *)[returnClass alloc] init] autorelease];
     
     NSInteger count = [array count];
     for (NSInteger k = 0; k < count; ++k) {

Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (176909 => 176910)


--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm	2014-12-06 21:04:35 UTC (rev 176910)
@@ -333,7 +333,7 @@
 - (void)setHyphenationFactor:(float)aFactor;
 @end
 
-@interface NSShadow
+@interface NSShadow : NSObject
 - (void)setShadowOffset:(CGSize)size;
 - (void)setShadowBlurRadius:(CGFloat)radius;
 - (void)setShadowColor:(UIColor *)color;
@@ -1001,7 +1001,7 @@
                 if (!spaceRange.length)
                     spaceRange = NSMakeRange(0, 0);
                 shadowBlurRadius = [[shadowStyle substringWithRange:NSMakeRange(NSMaxRange(spaceRange), thirdRange.location - NSMaxRange(spaceRange))] floatValue];
-                shadow = [[[PlatformNSShadow alloc] init] autorelease];
+                shadow = [[(NSShadow *)[PlatformNSShadow alloc] init] autorelease];
                 [shadow setShadowColor:shadowColor];
                 [shadow setShadowOffset:shadowOffset];
                 [shadow setShadowBlurRadius:shadowBlurRadius];
@@ -1830,7 +1830,7 @@
 
 void HTMLConverter::_addTableForElement(Element *tableElement)
 {
-    RetainPtr<NSTextTable> table = adoptNS([[PlatformNSTextTable alloc] init]);
+    RetainPtr<NSTextTable> table = adoptNS([(NSTextTable *)[PlatformNSTextTable alloc] init]);
     CGFloat cellSpacingVal = 1;
     CGFloat cellPaddingVal = 1;
     [table setNumberOfColumns:1];

Modified: trunk/Source/WebCore/platform/graphics/SVGGlyph.cpp (176909 => 176910)


--- trunk/Source/WebCore/platform/graphics/SVGGlyph.cpp	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/platform/graphics/SVGGlyph.cpp	2014-12-06 21:04:35 UTC (rev 176910)
@@ -112,11 +112,11 @@
         return true;
 
     Vector<SVGGlyph::ArabicForm>::const_iterator realEnd = chars.end();
-    Vector<SVGGlyph::ArabicForm>::const_iterator it = chars.begin() + startPosition;
+    Vector<SVGGlyph::ArabicForm>::const_iterator it = chars.begin() + static_cast<int>(startPosition);
     if (it >= realEnd)
         return true;
 
-    Vector<SVGGlyph::ArabicForm>::const_iterator end = chars.begin() + endPosition;
+    Vector<SVGGlyph::ArabicForm>::const_iterator end = chars.begin() + static_cast<int>(endPosition);
     if (end >= realEnd)
         end = realEnd;
 

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm (176909 => 176910)


--- trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm	2014-12-06 21:04:35 UTC (rev 176910)
@@ -184,7 +184,7 @@
     ASSERT(m_avPlayerItem);
     ASSERT(m_client);
 
-    m_avAudioMix = adoptNS([[getAVMutableAudioMixClass() alloc] init]);
+    m_avAudioMix = adoptNS([(AVMutableAudioMix *)[getAVMutableAudioMixClass() alloc] init]);
 
     MTAudioProcessingTapCallbacks callbacks = {
         0,
@@ -201,7 +201,7 @@
     ASSERT(tap);
     ASSERT(m_tap == tap);
 
-    RetainPtr<AVMutableAudioMixInputParameters> parameters = adoptNS([[getAVMutableAudioMixInputParametersClass() alloc] init]);
+    RetainPtr<AVMutableAudioMixInputParameters> parameters = adoptNS([(AVMutableAudioMixInputParameters *)[getAVMutableAudioMixInputParametersClass() alloc] init]);
     [parameters setAudioTapProcessor:m_tap.get()];
 
     CMPersistentTrackID firstEnabledAudioTrackID = kCMPersistentTrackID_Invalid;

Modified: trunk/Source/WebCore/platform/graphics/mac/FontMac.mm (176909 => 176910)


--- trunk/Source/WebCore/platform/graphics/mac/FontMac.mm	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/platform/graphics/mac/FontMac.mm	2014-12-06 21:04:35 UTC (rev 176910)
@@ -114,7 +114,7 @@
 
     static CUIStyleEffectConfiguration *styleConfiguration;
     if (!styleConfiguration) {
-        styleConfiguration = [[getCUIStyleEffectConfigurationClass() alloc] init];
+        styleConfiguration = [(CUIStyleEffectConfiguration *)[getCUIStyleEffectConfigurationClass() alloc] init];
         styleConfiguration.useSimplifiedEffect = YES;
     }
 

Modified: trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm (176909 => 176910)


--- trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm	2014-12-06 21:04:35 UTC (rev 176910)
@@ -97,7 +97,7 @@
         return;
     
     if (!m_synthesizer) {
-        m_synthesizer = adoptNS([[AVSpeechSynthesizerClass alloc] init]);
+        m_synthesizer = adoptNS([(AVSpeechSynthesizer *)[AVSpeechSynthesizerClass alloc] init]);
         [m_synthesizer setDelegate:self];
     }
 

Modified: trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm (176909 => 176910)


--- trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm	2014-12-06 21:04:35 UTC (rev 176910)
@@ -138,9 +138,7 @@
 {
     ASSERT(!WebThreadIsCurrent());
 
-#define CMMotionManager getCMMotionManagerClass()
-    m_motionManager = [[CMMotionManager alloc] init];
-#undef CMMotionManager
+    m_motionManager = [(CMMotionManager *)[getCMMotionManagerClass() alloc] init];
 
     m_gyroAvailable = m_motionManager.deviceMotionAvailable;
 
@@ -149,10 +147,8 @@
     else
         m_motionManager.accelerometerUpdateInterval = kMotionUpdateInterval;
 
-#define CLLocationManager getCLLocationManagerClass()
-    m_locationManager = [[CLLocationManager alloc] init];
-    m_headingAvailable = [CLLocationManager headingAvailable];
-#undef CLLocationManager
+    m_locationManager = [(CLLocationManager *)[getCLLocationManagerClass() alloc] init];
+    m_headingAvailable = [getCLLocationManagerClass() headingAvailable];
 
     [self checkClientStatus];
 }

Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (176909 => 176910)


--- trunk/Source/WebCore/rendering/RenderTableSection.cpp	2014-12-06 21:04:31 UTC (rev 176909)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp	2014-12-06 21:04:35 UTC (rev 176910)
@@ -1083,7 +1083,7 @@
     if (m_rowPos[nextRow] >= flippedRect.maxY())
         endRow = nextRow;
     else {
-        endRow = std::upper_bound(m_rowPos.begin() + nextRow, m_rowPos.end(), flippedRect.maxY()) - m_rowPos.begin();
+        endRow = std::upper_bound(m_rowPos.begin() + static_cast<int32_t>(nextRow), m_rowPos.end(), flippedRect.maxY()) - m_rowPos.begin();
         if (endRow == m_rowPos.size())
             endRow = m_rowPos.size() - 1;
     }
@@ -1114,7 +1114,7 @@
     if (columnPos[nextColumn] >= flippedRect.maxX())
         endColumn = nextColumn;
     else {
-        endColumn = std::upper_bound(columnPos.begin() + nextColumn, columnPos.end(), flippedRect.maxX()) - columnPos.begin();
+        endColumn = std::upper_bound(columnPos.begin() + static_cast<int32_t>(nextColumn), columnPos.end(), flippedRect.maxX()) - columnPos.begin();
         if (endColumn == columnPos.size())
             endColumn = columnPos.size() - 1;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to