avmedia/source/vlc/wrapper/SymbolLoader.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit eb6410b5cf5140a80a6d9703f26fc9a969996cfa Author: Stephan Bergmann <[email protected]> AuthorDate: Fri Nov 8 09:37:34 2019 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Fri Nov 8 12:40:39 2019 +0100 Fix Windows --eanble-vlc errors and (clang-cl) warnings Fix "no matching constructor" for OUString( arCurrent, dwCurrentSize ) from wchar_t and loplugin:cstylecast, loplugin:nullptr, and loplugin:stringconstant warnings. Change-Id: Ibe0341afe14a8c0380a69e9cbf946e68f9c58391 Reviewed-on: https://gerrit.libreoffice.org/82264 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Stephan Bergmann <[email protected]> diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx index 601aa62edd2a..aae124cb2575 100644 --- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx +++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx @@ -46,21 +46,21 @@ struct ApiMap inline OUString GetVLCPath() { HKEY hKey; - wchar_t arCurrent[MAX_PATH]; + sal_Unicode arCurrent[MAX_PATH]; DWORD dwType, dwCurrentSize = sizeof( arCurrent ); //TODO: This one will work only with LibreOffice 32-bit + VLC 32-bit on Win x86_64. const LONG errorCore = ::RegOpenKeyExW( HKEY_LOCAL_MACHINE, L"SOFTWARE\\Wow6432Node\\VideoLAN\\VLC", 0, KEY_READ | KEY_WOW64_64KEY, &hKey ); if ( errorCore == ERROR_SUCCESS ) { - if ( ::RegQueryValueExW( hKey, L"InstallDir", NULL, &dwType, (LPBYTE) arCurrent, &dwCurrentSize ) == ERROR_SUCCESS && + if ( ::RegQueryValueExW( hKey, L"InstallDir", nullptr, &dwType, reinterpret_cast<LPBYTE>(arCurrent), &dwCurrentSize ) == ERROR_SUCCESS && dwType == REG_SZ ) { ::RegCloseKey( hKey ); dwCurrentSize -= 2; dwCurrentSize /= 2; - return OUString( arCurrent, dwCurrentSize ) + OUString::createFromAscii("\\"); + return OUString( arCurrent, dwCurrentSize ) + "\\"; } ::RegCloseKey( hKey ); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
