Skip to content

Commit

Permalink
8311104: dangling-gsl warning in libwixhelper.cpp
Browse files Browse the repository at this point in the history
Reviewed-by: almatvee
  • Loading branch information
Alexey Semenyuk committed Jul 27, 2023
1 parent c05ba48 commit 0ca2bfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 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
Expand Down Expand Up @@ -72,10 +72,10 @@ class ProductInfo {

void findInstalledProducts(const Guid& upgradeCode,
std::vector<ProductInfo>& 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;
Expand Down

1 comment on commit 0ca2bfd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.