From 0ca2bfd77960a84486d10d910aa47b2aa9c14e22 Mon Sep 17 00:00:00 2001 From: Alexey Semenyuk Date: Thu, 27 Jul 2023 16:07:54 +0000 Subject: [PATCH] 8311104: dangling-gsl warning in libwixhelper.cpp Reviewed-by: almatvee --- .../windows/native/libwixhelper/libwixhelper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp b/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp index 59a4330252b..edfea6dc136 100644 --- a/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp +++ b/src/jdk.jpackage/windows/native/libwixhelper/libwixhelper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,10 +72,10 @@ private: void findInstalledProducts(const Guid& upgradeCode, std::vector& products) { - const LPCTSTR upgradeCodeStr = upgradeCode.toMsiString().c_str(); + const tstring upgradeCodeStr = upgradeCode.toMsiString(); for (DWORD productCodeIdx = 0; true; ++productCodeIdx) { TCHAR productCode[39 /* http://msdn.microsoft.com/en-us/library/aa370101(v=vs.85).aspx */]; - const UINT status = MsiEnumRelatedProducts(upgradeCodeStr, 0, + const UINT status = MsiEnumRelatedProducts(upgradeCodeStr.c_str(), 0, productCodeIdx, productCode); if (ERROR_NO_MORE_ITEMS == status) { break;