Title: [235966] trunk/Source/WebKitLegacy/win
Revision
235966
Author
[email protected]
Date
2018-09-12 19:14:05 -0700 (Wed, 12 Sep 2018)

Log Message

[Win][Clang][WebKitLegacy] Fix compilation errors and warnings of WebPreferences.cpp
https://bugs.webkit.org/show_bug.cgi?id=189538

Reviewed by Per Arne Vollan.

* WebPreferences.cpp:
Changed the type of CFNumberTraits::Type from unsigned int to CFNumberType.
(WebPreferences::migrateWebKitPreferencesToCFPreferences):
Apply static_cast to the result of OR-ed CFPropertyListFormat.
(WebPreferences::screenFontSubstitutionEnabled):
Assign false to the content of the out variable 'enabled', not assigning 0 to the variable.

Modified Paths

Diff

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (235965 => 235966)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2018-09-13 02:03:12 UTC (rev 235965)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2018-09-13 02:14:05 UTC (rev 235966)
@@ -1,5 +1,19 @@
 2018-09-12  Fujii Hironori  <[email protected]>
 
+        [Win][Clang][WebKitLegacy] Fix compilation errors and warnings of WebPreferences.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=189538
+
+        Reviewed by Per Arne Vollan.
+
+        * WebPreferences.cpp:
+        Changed the type of CFNumberTraits::Type from unsigned int to CFNumberType.
+        (WebPreferences::migrateWebKitPreferencesToCFPreferences):
+        Apply static_cast to the result of OR-ed CFPropertyListFormat.
+        (WebPreferences::screenFontSubstitutionEnabled):
+        Assign false to the content of the out variable 'enabled', not assigning 0 to the variable.
+
+2018-09-12  Fujii Hironori  <[email protected]>
+
         [Win][Clang][WebKitLegacy] error: 'static' is invalid in friend declarations
         https://bugs.webkit.org/show_bug.cgi?id=189539
 

Modified: trunk/Source/WebKitLegacy/win/WebPreferences.cpp (235965 => 235966)


--- trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2018-09-13 02:03:12 UTC (rev 235965)
+++ trunk/Source/WebKitLegacy/win/WebPreferences.cpp	2018-09-13 02:14:05 UTC (rev 235966)
@@ -61,10 +61,10 @@
     return path;
 }
 
-template<typename NumberType> struct CFNumberTraits { static const unsigned Type; };
-template<> struct CFNumberTraits<int> { static const unsigned Type = kCFNumberSInt32Type; };
-template<> struct CFNumberTraits<LONGLONG> { static const unsigned Type = kCFNumberLongLongType; };
-template<> struct CFNumberTraits<float> { static const unsigned Type = kCFNumberFloat32Type; };
+template<typename NumberType> struct CFNumberTraits { static const CFNumberType Type; };
+template<> struct CFNumberTraits<int> { static const CFNumberType Type = kCFNumberSInt32Type; };
+template<> struct CFNumberTraits<LONGLONG> { static const CFNumberType Type = kCFNumberLongLongType; };
+template<> struct CFNumberTraits<float> { static const CFNumberType Type = kCFNumberFloat32Type; };
 
 template<typename NumberType>
 static NumberType numberValueForPreferencesValue(CFPropertyListRef value)
@@ -515,7 +515,7 @@
     if (!CFReadStreamOpen(stream.get()))
         return;
 
-    CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0;
+    auto format = static_cast<CFPropertyListFormat>(kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0);
     RetainPtr<CFPropertyListRef> plist = adoptCF(CFPropertyListCreateFromStream(0, stream.get(), 0, kCFPropertyListMutableContainersAndLeaves, &format, 0));
     CFReadStreamClose(stream.get());
 
@@ -1352,7 +1352,7 @@
 {
     if (!enabled)
         return E_POINTER;
-    enabled = false;
+    *enabled = false;
     return S_OK;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to