Bug 43920

Summary: Fix warning in WebCore\plugins\win\PluginPackageWin.cpp
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: allan.jensen, aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 43191    
Attachments:
Description Flags
proposed fix none

Description Csaba Osztrogonác 2010-08-12 08:23:19 PDT
warning on Windows in debug mode with MinGW:

..\..\..\WebCore\plugins\win\PluginPackageWin.cpp: In member function 'bool WebCore::PluginPackage::fetchInfo()':
..\..\..\WebCore\plugins\win\PluginPackageWin.cpp:184: warning: deprecated conversion from string constant to 'WCHAR*'

WebCore\plugins\win\PluginPackageWin.cpp:184:
if (!VerQueryValue(versionInfoData.get(), TEXT("\\"), (LPVOID*) &info, &infoSize) || infoSize < sizeof(VS_FIXEDFILEINFO))
        return false;
Comment 1 Csaba Osztrogonác 2010-08-16 08:35:48 PDT
Created attachment 64498 [details]
proposed fix

Adam, I tested your idea, it works with Qt-Windows-MinGW trio.
Comment 2 Csaba Osztrogonác 2010-08-16 08:36:16 PDT
Let's see the Win EWS.
Comment 3 Adam Roben (:aroben) 2010-08-16 08:59:05 PDT
Comment on attachment 64498 [details]
proposed fix

r=me
Comment 4 Csaba Osztrogonác 2010-08-16 09:33:12 PDT
Landed in http://trac.webkit.org/changeset/65432
Comment 5 Csaba Osztrogonác 2010-09-08 03:12:47 PDT
..\..\..\WebCore\plugins\win\PluginPackageWin.cpp: In member function 'bool WebCore::PluginPackage::fetchInfo()':
..\..\..\WebCore\plugins\win\PluginPackageWin.cpp:184: warning: deprecated conversion from string constant to 'WCHAR*'

if (!VerQueryValueW(versionInfoData.get(), L"\\", (LPVOID*) &info, &infoSize) || infoSize < sizeof(VS_FIXEDFILEINFO))
        return false;

Unfortunately MinGW still warns. I thought 
it worked, because I missed --debug option. :(
Comment 6 Adam Roben (:aroben) 2010-09-08 07:07:24 PDT
(In reply to comment #5)
> ..\..\..\WebCore\plugins\win\PluginPackageWin.cpp: In member function 'bool WebCore::PluginPackage::fetchInfo()':
> ..\..\..\WebCore\plugins\win\PluginPackageWin.cpp:184: warning: deprecated conversion from string constant to 'WCHAR*'
> 
> if (!VerQueryValueW(versionInfoData.get(), L"\\", (LPVOID*) &info, &infoSize) || infoSize < sizeof(VS_FIXEDFILEINFO))
>         return false;
> 
> Unfortunately MinGW still warns. I thought 
> it worked, because I missed --debug option. :(

I don't see any WCHAR* involved here. VerQueryValue's second parameter is an LPCTSTR, so VerQueryValueW's second parameter should be an LPCWSTR, i.e. const WCHAR*. L"\\" should give us a const WCHAR*. I don't understand the error, nor what "string constant" it is referring to.