RFR: 8301302: Platform preferences API [v39]
Kevin Rushforth
kcr at openjdk.org
Wed Dec 6 20:03:31 UTC 2023
On Wed, 6 Dec 2023 01:02:55 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/native-glass/win/RoActivationSupport.cpp line 213:
>>
>>> 211: RoException& RoException::operator=(RoException source)
>>> 212: {
>>> 213: std::swap(*this, source);
>>
>> Did you mean to do the swap here?
>
> Yes. This is the copy-and-swap idiom, where the copy is made by using a pass-by-value parameter.
I see.
I did happen to spot this compiler warning while compiling:
.../VC/bin/x64/cl.exe /nologo /W3 /EHsc /c /DINLINE=__inline /DUNICODE /D_UNICODE /DWIN32 /DIAL /D_LITTLE_ENDIAN /DWIN32_LEAN_AND_MEAN /IC:/Users/kcr/dev/jdks/jdk-19.0.2/include /I.../jdk-19.0.2/include/win32 /O2 /MD /DNDEBUG -Imodules\javafx.graphics\build\gensrc\headers\javafx.graphics -Imodules\javafx.graphics\src\main\native-glass\win /Fomodules\javafx.graphics\build\native\glass\win\RoActivationSupport.obj modules\javafx.graphics\src\main\native-glass\win\RoActivationSupport.cpp
VC\include\utility(103) : warning C4717: 'std::swap<RoException,0>': recursive on all control paths, function will cause runtime stack overflow
modules\javafx.graphics\src\main\native-glass\win\RoActivationSupport.cpp(233) : warning C4717: 'RoException::operator=': recursive on all control paths, function will cause runtime stack overflow
you can see that in your GHA build as well. I don't know for certain whether this is a problem in practice or not, but it would be good to eliminate the warning.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1014#discussion_r1417913075
More information about the openjfx-dev
mailing list