Bug 262535

Summary: [WebTransport] Fix build of trimToValidUTF8Length1024() with -Wreturn-std-move
Product: WebKit Reporter: Olivier Blin <olivier.blin>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=261007

Description Olivier Blin 2023-10-03 05:08:06 PDT
The following errors occurred in a developer build:


/app/webkit/Source/WebCore/Modules/webtransport/WebTransport.cpp:215:16: error: local variable 'string' will be copied despite being returned by name [-Werror,-Wreturn-std-move]
        return string;
               ^~~~~~
/app/webkit/Source/WebCore/Modules/webtransport/WebTransport.cpp:215:16: note: call 'std::move' explicitly to avoid copying
        return string;
               ^~~~~~
               std::move(string)
/app/webkit/Source/WebCore/Modules/webtransport/WebTransport.cpp:219:20: error: local variable 'string' will be copied despite being returned by name [-Werror,-Wreturn-std-move]
            return string;
                   ^~~~~~
/app/webkit/Source/WebCore/Modules/webtransport/WebTransport.cpp:219:20: note: call 'std::move' explicitly to avoid copying
            return string;
                   ^~~~~~
                   std::move(string)
/app/webkit/Source/WebCore/Modules/webtransport/WebTransport.cpp:224:20: error: local variable 'string' will be copied despite being returned by name [-Werror,-Wreturn-std-move]
            return string;
                   ^~~~~~
/app/webkit/Source/WebCore/Modules/webtransport/WebTransport.cpp:224:20: note: call 'std::move' explicitly to avoid copying
            return string;
                   ^~~~~~
                   std::move(string)
Comment 1 Olivier Blin 2023-10-03 05:19:00 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18547
Comment 2 EWS 2023-10-04 17:55:59 PDT
Committed 268885@main (09d53ca80dff): <https://commits.webkit.org/268885@main>

Reviewed commits have been landed. Closing PR #18547 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-10-04 17:57:22 PDT
<rdar://problem/116496021>