[Webkit-unassigned] [Bug 189538] New: [Win][Clang][WebKitLegacy] Fix compilation errors and warnings of WebPreferences.cpp
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 11 23:38:19 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=189538
Bug ID: 189538
Summary: [Win][Clang][WebKitLegacy] Fix compilation errors and
warnings of WebPreferences.cpp
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: Hironori.Fujii at sony.com
Blocks: 188635
[Win][Clang][WebKitLegacy] Fix compilation errors and warnings of WebPreferences.cpp
While trying to build WebKit WinCairo port with the latest Clang (Bug 171618),
the following compilation errors and warnings are reported.
> [8/31] Building CXX object Source\WebKitLegacy\CMakeFiles\WebKitLegacy.dir\win\WebPreferences.cpp.obj
> FAILED: Source/WebKitLegacy/CMakeFiles/WebKitLegacy.dir/win/WebPreferences.cpp.obj
> C:\tools\llvm\bin\clang-cl.exe (...) -c ..\..\Source\WebKitLegacy\win\WebPreferences.cpp
> In file included from ..\..\Source\WebKitLegacy\win\WebPreferences.cpp:27:
> ..\..\Source\WebKitLegacy\win/WebKitDLL.h(53,37): warning: 'gClassNameCount' has C-linkage specified, but returns user-defined type 'HashCountedSet<WTF::String> &' which is incompatible with C [-Wreturn-type-c-linkage]
> extern HashCountedSet<WTF::String>& gClassNameCount();
> ^
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(518,26): error: cannot initialize a variable of type 'CFPropertyListFormat' with an rvalue of type 'long long'
> CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0;
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(1355,15): warning: initialization of pointer of type 'BOOL *' (aka 'int *') to null from a constant boolean expression [-Wbool-conversion]
> enabled = false;
> ^~~~~
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(83,9): error: no matching function for call to 'CFNumberGetValue'
> CFNumberGetValue(static_cast<CFNumberRef>(value), CFNumberTraits<NumberType>::Type, &val);
> ^~~~~~~~~~~~~~~~
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(98,12): note: in instantiation of function template specialization 'numberValueForPreferencesValue<int>' requested here
> return numberValueForPreferencesValue<int>(value);
> ^
> C:\webkit\ga\WebKitBuild\Debug\..\..\WebKitLibraries\win\include\CoreFoundation\CFNumber.h(133,9): note: candidate function not viable: no known conversion from 'const unsigned int' to 'CFNumberType' for 2nd argument
> Boolean CFNumberGetValue(CFNumberRef number, CFNumberType theType, void *valuePtr);
> ^
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(83,9): error: no matching function for call to 'CFNumberGetValue'
> CFNumberGetValue(static_cast<CFNumberRef>(value), CFNumberTraits<NumberType>::Type, &val);
> ^~~~~~~~~~~~~~~~
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(409,12): note: in instantiation of function template specialization 'numberValueForPreferencesValue<float>' requested here
> return numberValueForPreferencesValue<float>(valueForKey(key).get());
> ^
> C:\webkit\ga\WebKitBuild\Debug\..\..\WebKitLibraries\win\include\CoreFoundation\CFNumber.h(133,9): note: candidate function not viable: no known conversion from 'const unsigned int' to 'CFNumberType' for 2nd argument
> Boolean CFNumberGetValue(CFNumberRef number, CFNumberType theType, void *valuePtr);
> ^
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(83,9): error: no matching function for call to 'CFNumberGetValue'
> CFNumberGetValue(static_cast<CFNumberRef>(value), CFNumberTraits<NumberType>::Type, &val);
> ^~~~~~~~~~~~~~~~
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(414,12): note: in instantiation of function template specialization 'numberValueForPreferencesValue<long long>' requested here
> return numberValueForPreferencesValue<LONGLONG>(valueForKey(key).get());
> ^
> C:\webkit\ga\WebKitBuild\Debug\..\..\WebKitLibraries\win\include\CoreFoundation\CFNumber.h(133,9): note: candidate function not viable: no known conversion from 'const unsigned int' to 'CFNumberType' for 2nd argument
> Boolean CFNumberGetValue(CFNumberRef number, CFNumberType theType, void *valuePtr);
> ^
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(93,20): error: no matching function for call to 'CFNumberCreate'
> return adoptCF(CFNumberCreate(0, CFNumberTraits<NumberType>::Type, &value));
> ^~~~~~~~~~~~~~
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(435,25): note: in instantiation of function template specialization 'cfNumber<int>' requested here
> setValueForKey(key, cfNumber(value).get());
> ^
> C:\webkit\ga\WebKitBuild\Debug\..\..\WebKitLibraries\win\include\CoreFoundation\CFNumber.h(102,13): note: candidate function not viable: no known conversion from 'const unsigned int' to 'CFNumberType' for 2nd argument
> CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType theType, const void *valuePtr);
> ^
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(93,20): error: no matching function for call to 'CFNumberCreate'
> return adoptCF(CFNumberCreate(0, CFNumberTraits<NumberType>::Type, &value));
> ^~~~~~~~~~~~~~
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(445,25): note: in instantiation of function template specialization 'cfNumber<float>' requested here
> setValueForKey(key, cfNumber(value).get());
> ^
> C:\webkit\ga\WebKitBuild\Debug\..\..\WebKitLibraries\win\include\CoreFoundation\CFNumber.h(102,13): note: candidate function not viable: no known conversion from 'const unsigned int' to 'CFNumberType' for 2nd argument
> CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType theType, const void *valuePtr);
> ^
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(93,20): error: no matching function for call to 'CFNumberCreate'
> return adoptCF(CFNumberCreate(0, CFNumberTraits<NumberType>::Type, &value));
> ^~~~~~~~~~~~~~
> ..\..\Source\WebKitLegacy\win\WebPreferences.cpp(465,25): note: in instantiation of function template specialization 'cfNumber<long long>' requested here
> setValueForKey(key, cfNumber(value).get());
> ^
> C:\webkit\ga\WebKitBuild\Debug\..\..\WebKitLibraries\win\include\CoreFoundation\CFNumber.h(102,13): note: candidate function not viable: no known conversion from 'const unsigned int' to 'CFNumberType' for 2nd argument
> CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType theType, const void *valuePtr);
> ^
> 2 warnings and 7 errors generated.
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=188635
[Bug 188635] [Win] Visual Studio 2017 version 15.8 can't compile WebKit
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180912/895f15de/attachment-0001.html>
More information about the webkit-unassigned
mailing list