WebKit Bugzilla
Attachment 340343 Details for
Bug 185621
: Fix -Wreturn-std-move warnings in WebKit found by new clang compiler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-185621-20180514124257.patch (text/plain), 5.74 KB, created by
David Kilzer (:ddkilzer)
on 2018-05-14 12:42:58 PDT
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2018-05-14 12:42:58 PDT
Size:
5.74 KB
patch
obsolete
>Subversion Revision: 231739 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index cf540aec2a73503bea3bb0d3d9ba349723b88337..4889dce7afee54f6e83db97c3c76eb292a801f7b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,34 @@ >+2018-05-14 David Kilzer <ddkilzer@apple.com> >+ >+ Fix -Wreturn-std-move warnings in WebKit found by new clang compiler >+ <https://webkit.org/b/185621> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Fix warnings like the following: >+ >+ In file included from DerivedSources/WebCore/unified-sources/UnifiedSource139.cpp:5: >+ ./Modules/mediastream/PeerConnectionBackend.cpp:412:16: error: local variable 'sdp' will be copied despite being returned by name [-Werror,-Wreturn-std-move] >+ return sdp; >+ ^~~ >+ ./Modules/mediastream/PeerConnectionBackend.cpp:412:16: note: call 'std::move' explicitly to avoid copying >+ return sdp; >+ ^~~ >+ std::move(sdp) >+ 1 error generated. >+ >+ * Modules/mediastream/PeerConnectionBackend.cpp: >+ (WebCore::PeerConnectionBackend::filterSDP const): >+ * accessibility/AccessibilityObject.cpp: >+ (WebCore::rangeClosestToRange): >+ * bindings/js/JSDOMConvertSequences.h: >+ (WebCore::Detail::GenericSequenceConverter::convert): >+ (WebCore::Detail::NumericSequenceConverter::convertArray): >+ * bindings/js/JSDOMConvertStrings.cpp: >+ (WebCore::stringToByteString): >+ (WebCore::stringToUSVString): >+ - Use WTFMove() in return statements to fix the warnings. >+ > 2018-05-13 Dirk Schulze <krit@webkit.org> > > Implement SVGGeometryElement's isPointInFill and isPointInStroke >diff --git a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp >index dc51bb510a6e48d6e16f0aa0b5798748f865e3ee..e12a08676f9e1211472f3e14407e203f4c8613a0 100644 >--- a/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp >+++ b/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp >@@ -409,7 +409,7 @@ static String filterICECandidate(String&& sdp) > String PeerConnectionBackend::filterSDP(String&& sdp) const > { > if (!m_shouldFilterICECandidates) >- return sdp; >+ return WTFMove(sdp); > > StringBuilder filteredSDP; > sdp.split('\n', false, [&filteredSDP](StringView line) { >diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp >index f29c88696941d97964351516930da4def4edfff0..c9c96d46c1cb57a0a2e26ad830ceece1bd3605ae 100644 >--- a/Source/WebCore/accessibility/AccessibilityObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp >@@ -730,9 +730,9 @@ static RefPtr<Range> rangeClosestToRange(Range* referenceRange, RefPtr<Range>&& > if (!afterRange && !beforeRange) > return nullptr; > if (afterRange && !beforeRange) >- return afterRange; >+ return WTFMove(afterRange); > if (!afterRange && beforeRange) >- return beforeRange; >+ return WTFMove(beforeRange); > > unsigned positionsToAfterRange = Position::positionCountBetweenPositions(afterRange->startPosition(), referenceRange->endPosition()); > unsigned positionsToBeforeRange = Position::positionCountBetweenPositions(beforeRange->endPosition(), referenceRange->startPosition()); >diff --git a/Source/WebCore/bindings/js/JSDOMConvertSequences.h b/Source/WebCore/bindings/js/JSDOMConvertSequences.h >index 2b3da229fbf9bf8ca4cfb8a2ca9aa89996f4b34e..b07180277dc4388fc25b2ba14d68be246b310ef5 100644 >--- a/Source/WebCore/bindings/js/JSDOMConvertSequences.h >+++ b/Source/WebCore/bindings/js/JSDOMConvertSequences.h >@@ -57,7 +57,7 @@ struct GenericSequenceConverter { > return; > result.append(WTFMove(convertedValue)); > }); >- return result; >+ return WTFMove(result); > } > > static ReturnType convert(JSC::ExecState& state, JSC::JSObject* object, JSC::JSValue method) >@@ -75,7 +75,7 @@ struct GenericSequenceConverter { > return; > result.append(WTFMove(convertedValue)); > }); >- return result; >+ return WTFMove(result); > } > }; > >@@ -99,7 +99,7 @@ struct NumericSequenceConverter { > else > result.uncheckedAppend(indexValue.asInt32()); > } >- return result; >+ return WTFMove(result); > } > > ASSERT(indexingType == JSC::DoubleShape); >@@ -114,7 +114,7 @@ struct NumericSequenceConverter { > result.uncheckedAppend(convertedValue); > } > } >- return result; >+ return WTFMove(result); > } > > static ReturnType convert(JSC::ExecState& state, JSC::JSValue value) >diff --git a/Source/WebCore/bindings/js/JSDOMConvertStrings.cpp b/Source/WebCore/bindings/js/JSDOMConvertStrings.cpp >index 7d2de181f405ae8334121ad2e7787f83e24c3c4c..1ca1ce3dd1aee6e7de3b66b1f6513f6a38e4f55d 100644 >--- a/Source/WebCore/bindings/js/JSDOMConvertStrings.cpp >+++ b/Source/WebCore/bindings/js/JSDOMConvertStrings.cpp >@@ -39,7 +39,7 @@ static inline String stringToByteString(ExecState& state, JSC::ThrowScope& scope > return { }; > } > >- return string; >+ return WTFMove(string); > } > > String identifierToByteString(ExecState& state, const Identifier& identifier) >@@ -78,7 +78,7 @@ static inline String stringToUSVString(String&& string) > { > // Fast path for the case where there are no unpaired surrogates. > if (!hasUnpairedSurrogate(string)) >- return string; >+ return WTFMove(string); > > // Slow path: http://heycam.github.io/webidl/#dfn-obtain-unicode > // Replaces unpaired surrogates with the replacement character.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185621
: 340343 |
340377