Bug 43920 - Fix warning in WebCore\plugins\win\PluginPackageWin.cpp
Summary: Fix warning in WebCore\plugins\win\PluginPackageWin.cpp
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 43191
  Show dependency treegraph
 
Reported: 2010-08-12 08:23 PDT by Csaba Osztrogonác
Modified: 2013-11-22 08:54 PST (History)
2 users (show)

See Also:


Attachments
proposed fix (1.23 KB, patch)
2010-08-16 08:35 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.