On Wed, 26 Jul 2023 20:05:11 GMT, Alexander Matveev <almat...@openjdk.org> 
wrote:

>> 8311104: dangling-gsl warning in libwixhelper.cpp
>
> src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp line 75:
> 
>> 73: void findInstalledProducts(const Guid& upgradeCode,
>> 74:                                             std::vector<ProductInfo>& 
>> products) {
>> 75:     const tstring upgradeCodeStr = upgradeCode.toMsiString();
> 
> I am not familiar with this warning. Does it mean that in original `const 
> LPCTSTR upgradeCodeStr = upgradeCode.toMsiString().c_str();`, `tstring` 
> retuned from `toMsiString()` will get destroyed right after` c_str()` 
> completed? Which will make `upgradeCodeStr` invalid?

Yep, that is correct

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15044#discussion_r1275467144

Reply via email to