Changeset 221152 in webkit
- Timestamp:
- Aug 24, 2017 11:35:39 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r221147 r221152 1 2017-08-24 David Kilzer <ddkilzer@apple.com> 2 3 Fix -Wcast-qual and -Wunused-lambda-capture warnings in WebCore with new clang compiler 4 <https://webkit.org/b/175910> 5 <rdar://problem/33667497> 6 7 Reviewed by Alex Christensen. 8 9 Fix -Wunused-lambda-capture warnings: 10 11 * Modules/fetch/FetchResponse.cpp: 12 (WebCore::FetchResponse::setBodyData): Remove unused lambda 13 capture of 'this'. 14 * style/RenderTreeUpdater.cpp: 15 (WebCore::RenderTreeUpdater::createRenderer): Add 16 UNUSED_PARAM(style) when ENABLE(CSS_REGIONS) is turned off. 17 18 Fix -Wcast-qual warnings: 19 20 * crypto/mac/CryptoKeyRSAMac.cpp: 21 (WebCore::CryptoKeyRSA::create): Switch from C-style cast to 22 reinterpret_cast with const keyword. This better matches the 23 argument types used in CCRSACryptorCreateFromData(). 24 * platform/audio/mac/FFTFrameMac.cpp: 25 (WebCore::FFTFrame::doFFT): Switch from C-style cast to 26 reinterpret_cast with const keyword. This better matches the 27 argument type used in vDSP_ctoz(). 28 * platform/graphics/FontPlatformData.h: Only define 29 WebCore::toCTFont() and WebCore::toNSFont() when building for 30 Objective-C++. 31 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 32 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): 33 Switch from C-style cast to reinterpret_cast with const keyword. 34 This better matches the argument type used in 35 Uint8Array::setRange(). 36 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: 37 (WebCore::CMTimebaseEffectiveRateChangedCallback): Use 38 const_cast to avoid warning. 39 * platform/mac/SSLKeyGeneratorMac.mm: 40 (WebCore::signedPublicKeyAndChallengeString): Use const_cast to 41 avoid warning, and switch C-style cast to reinterpret_cast. 42 * xml/XSLTProcessorLibxslt.cpp: 43 (WebCore::XSLTProcessor::transformToString): 44 - Use const_cast to avoid warning, and switch C-style cast to 45 reinterpret_cast. 46 - Switch C-style cast to reinterpret_cast and add const keyword. 47 * xml/parser/XMLDocumentParserLibxml2.cpp: 48 (WebCore::XMLParserContext::createMemoryParser): Use const_cast 49 to avoid warning, and switch C-style cast to reinterpret_cast. 50 1 51 2017-08-22 Dave Hyatt <hyatt@apple.com> 2 52 -
trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp
r220948 r221152 298 298 setBody(FetchBody::loadingBody()); 299 299 body().consumer().setData(WTFMove(buffer)); 300 }, [ this](std::nullptr_t&) { });300 }, [](std::nullptr_t&) { }); 301 301 } 302 302 -
trunk/Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp
r220954 r221152 137 137 CCCryptorStatus status = CCRSACryptorCreateFromData( 138 138 keyData.type() == CryptoKeyRSAComponents::Type::Public ? ccRSAKeyPublic : ccRSAKeyPrivate, 139 (uint8_t*)keyData.modulus().data(), keyData.modulus().size(),140 (uint8_t*)keyData.exponent().data(), keyData.exponent().size(),141 (uint8_t*)keyData.firstPrimeInfo().primeFactor.data(), keyData.firstPrimeInfo().primeFactor.size(),142 (uint8_t*)keyData.secondPrimeInfo().primeFactor.data(), keyData.secondPrimeInfo().primeFactor.size(),139 reinterpret_cast<const uint8_t*>(keyData.modulus().data()), keyData.modulus().size(), 140 reinterpret_cast<const uint8_t*>(keyData.exponent().data()), keyData.exponent().size(), 141 reinterpret_cast<const uint8_t*>(keyData.firstPrimeInfo().primeFactor.data()), keyData.firstPrimeInfo().primeFactor.size(), 142 reinterpret_cast<const uint8_t*>(keyData.secondPrimeInfo().primeFactor.data()), keyData.secondPrimeInfo().primeFactor.size(), 143 143 &cryptor); 144 144 -
trunk/Source/WebCore/platform/audio/mac/FFTFrameMac.cpp
r172431 r221152 130 130 void FFTFrame::doFFT(const float* data) 131 131 { 132 vDSP_ctoz( (DSPComplex*)data, 2, &m_frame, 1, m_FFTSize / 2);132 vDSP_ctoz(reinterpret_cast<const DSPComplex*>(data), 2, &m_frame, 1, m_FFTSize / 2); 133 133 vDSP_fft_zrip(m_FFTSetup, &m_frame, 1, m_log2FFTSize, FFT_FORWARD); 134 134 } -
trunk/Source/WebCore/platform/graphics/FontPlatformData.h
r219055 r221152 276 276 }; 277 277 278 #if USE(APPKIT) 278 #if USE(APPKIT) && defined(__OBJC__) 279 279 280 280 // NSFonts and CTFontRefs are toll-free-bridged. -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r220979 r221152 1844 1844 1845 1845 RefPtr<Uint8Array> initData = Uint8Array::create(utf8EncodedKeyId.length()); 1846 initData->setRange( (JSC::Uint8Adaptor::Type*)utf8EncodedKeyId.data(), utf8EncodedKeyId.length(), 0);1846 initData->setRange(reinterpret_cast<const JSC::Uint8Adaptor::Type*>(utf8EncodedKeyId.data()), utf8EncodedKeyId.length(), 0); 1847 1847 1848 1848 auto keyData = player()->cachedKeyForKeyId(keyID); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
r221098 r221152 116 116 static void CMTimebaseEffectiveRateChangedCallback(CMNotificationCenterRef, const void *listener, CFStringRef, const void *, CFTypeRef) 117 117 { 118 MediaPlayerPrivateMediaSourceAVFObjC* player = (MediaPlayerPrivateMediaSourceAVFObjC*) listener;118 MediaPlayerPrivateMediaSourceAVFObjC* player = (MediaPlayerPrivateMediaSourceAVFObjC*)const_cast<void*>(listener); 119 119 callOnMainThread([weakThis = player->createWeakPtr()] { 120 120 if (!weakThis) -
trunk/Source/WebCore/platform/mac/SSLKeyGeneratorMac.mm
r215450 r221152 185 185 // Length needs to account for the null terminator. 186 186 signedPublicKeyAndChallenge.publicKeyAndChallenge.challenge.Length = challenge.length() + 1; 187 signedPublicKeyAndChallenge.publicKeyAndChallenge.challenge.Data = (uint8_t*)challenge.data();187 signedPublicKeyAndChallenge.publicKeyAndChallenge.challenge.Data = reinterpret_cast<uint8_t*>(const_cast<char*>(challenge.data())); 188 188 189 189 CSSM_DATA encodedPublicKeyAndChallenge { 0, nullptr }; -
trunk/Source/WebCore/style/RenderTreeUpdater.cpp
r220956 r221152 359 359 if (element.shouldMoveToFlowThread(style)) 360 360 return RenderTreePosition::insertionPositionForFlowThread(renderTreePosition().parent().element(), element, style); 361 #else 362 UNUSED_PARAM(style); 361 363 #endif 362 364 renderTreePosition().computeNextSibling(element); -
trunk/Source/WebCore/xml/XSLTProcessorLibxslt.cpp
r219191 r221152 318 318 xmlChar* origMethod = sheet->method; 319 319 if (!origMethod && mimeType == "text/html") 320 sheet->method = (xmlChar*)"html";320 sheet->method = reinterpret_cast<xmlChar*>(const_cast<char*>("html")); 321 321 322 322 bool success = false; … … 362 362 if ((success = saveResultToString(resultDoc, sheet, resultString))) { 363 363 mimeType = resultMIMEType(resultDoc, sheet); 364 resultEncoding = (char*)resultDoc->encoding;364 resultEncoding = reinterpret_cast<const char*>(resultDoc->encoding); 365 365 } 366 366 xmlFreeDoc(resultDoc); -
trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
r219237 r221152 549 549 parser->instate = XML_PARSER_CONTENT; // We are parsing a CONTENT 550 550 parser->depth = 0; 551 parser->str_xml = xmlDictLookup(parser->dict, BAD_CAST "xml", 3);552 parser->str_xmlns = xmlDictLookup(parser->dict, BAD_CAST "xmlns", 5);551 parser->str_xml = xmlDictLookup(parser->dict, reinterpret_cast<xmlChar*>(const_cast<char*>("xml")), 3); 552 parser->str_xmlns = xmlDictLookup(parser->dict, reinterpret_cast<xmlChar*>(const_cast<char*>("xmlns")), 5); 553 553 parser->str_xml_ns = xmlDictLookup(parser->dict, XML_XML_NAMESPACE, 36); 554 554 parser->_private = userData;
Note: See TracChangeset
for help on using the changeset viewer.