Don't pass unused optional agrument

IShellLinkW::GetPath allows to pass nullptr to its third argument:
see https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishelllinkw-getpath

Change-Id: Icf1ca402448b8dfcc3a5ab2834341e67e8dc0b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169869
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski 2024-07-02 15:11:17 +05:00
parent 8a6fb1793d
commit 79c710438a

View file

@ -289,8 +289,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
"IPersistFile.Load failed");
sal::systools::ThrowIfFailed(link->Resolve(nullptr, SLR_UPDATE | SLR_NO_UI),
"IShellLink.Resolve failed");
WIN32_FIND_DATAW wfd;
sal::systools::ThrowIfFailed(link->GetPath(path, std::size(path), &wfd, SLGP_RAWPATH),
sal::systools::ThrowIfFailed(link->GetPath(path, std::size(path), nullptr, SLGP_RAWPATH),
"IShellLink.GetPath failed");
}
catch (sal::systools::ComError& e)