RESOLVED FIXED 234503
[Win] MSVC reports "DumpRenderTree.cpp(633): error C2362: initialization of 'length' is skipped by 'goto exit'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234503
Summary [Win] MSVC reports "DumpRenderTree.cpp(633): error C2362: initialization of '...
Fujii Hironori
Reported 2021-12-19 22:14:57 PST
[Win] MSVC reports "DumpRenderTree.cpp(633): error C2362: initialization of 'length' is skipped by 'goto exit'" with /std:c++20 > Tools\DumpRenderTree\win\DumpRenderTree.cpp(633): error C2362: initialization of 'length' is skipped by 'goto exit' > Tools\DumpRenderTree\win\DumpRenderTree.cpp(611): note: see declaration of 'length' > Tools\DumpRenderTree\win\DumpRenderTree.cpp(633): note: see declaration of 'exit'
Attachments
Patch (2.99 KB, patch)
2021-12-19 22:18 PST, Fujii Hironori
no flags
Patch r287297 (3.13 KB, patch)
2021-12-20 12:46 PST, Fujii Hironori
no flags
Patch (2.01 KB, patch)
2021-12-21 17:05 PST, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2021-12-19 22:18:37 PST
Fujii Hironori
Comment 2 2021-12-20 12:46:44 PST
Fujii Hironori
Comment 3 2021-12-20 20:52:29 PST
Comment on attachment 447621 [details] Patch r287297 Clearing flags on attachment: 447621 Committed r287297 (245449@trunk): <https://commits.webkit.org/245449@trunk>
Fujii Hironori
Comment 4 2021-12-20 20:52:33 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5 2021-12-20 20:53:16 PST
Darin Adler
Comment 6 2021-12-21 01:20:34 PST
Comment on attachment 447621 [details] Patch r287297 View in context: https://bugs.webkit.org/attachment.cgi?id=447621&action=review > Tools/DumpRenderTree/win/DumpRenderTree.cpp:597 > + SAFEARRAY* arraryPtr; "array" is good, but "arrary" not so good > Tools/DumpRenderTree/win/DumpRenderTree.cpp:605 > + std::unique_ptr<SAFEARRAY, decltype(deleter)> array(arraryPtr, deleter); I suspect we can rely on deduction guides and just write std::unique_ptr here without the template arguments.
Fujii Hironori
Comment 7 2021-12-21 02:27:23 PST
Reopened.
Fujii Hironori
Comment 8 2021-12-21 17:05:13 PST
Fujii Hironori
Comment 9 2022-01-04 22:53:10 PST
Comment on attachment 447766 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447766&action=review > Tools/DumpRenderTree/win/DumpRenderTree.cpp:602 > + if (SUCCEEDED(::SafeArrayUnlock(arrayPtr))) This code has another bug. I'm going to fix this typo and the bug in the following ticket. Bug 234870 – [Win][DumpRenderTree] dumpHistoryItem leaks a SafeArray
Note You need to log in before you can comment on or make changes to this bug.