Title: [287432] trunk/Source/WebCore
- Revision
- 287432
- Author
- [email protected]
- Date
- 2021-12-24 13:39:38 -0800 (Fri, 24 Dec 2021)
Log Message
[Win] MSVC reports "DownloadBundleWin.cpp(87): error C2362: initialization of 'magic' is skipped by 'goto exit'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234504
<rdar://problem/86755997>
Reviewed by Darin Adler.
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::appendResumeData): Use fclose directly.
(WebCore::DownloadBundle::extractResumeData): Ditto.
(WebCore::DownloadBundle::fileCloser): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (287431 => 287432)
--- trunk/Source/WebCore/ChangeLog 2021-12-24 21:02:24 UTC (rev 287431)
+++ trunk/Source/WebCore/ChangeLog 2021-12-24 21:39:38 UTC (rev 287432)
@@ -1,3 +1,16 @@
+2021-12-24 Fujii Hironori <[email protected]>
+
+ [Win] MSVC reports "DownloadBundleWin.cpp(87): error C2362: initialization of 'magic' is skipped by 'goto exit'" with /std:c++20
+ https://bugs.webkit.org/show_bug.cgi?id=234504
+ <rdar://problem/86755997>
+
+ Reviewed by Darin Adler.
+
+ * platform/network/win/DownloadBundleWin.cpp:
+ (WebCore::DownloadBundle::appendResumeData): Use fclose directly.
+ (WebCore::DownloadBundle::extractResumeData): Ditto.
+ (WebCore::DownloadBundle::fileCloser): Deleted.
+
2021-12-24 Simon Fraser <[email protected]>
Apply the scroll delta in the "began" wheel event
Modified: trunk/Source/WebCore/platform/network/win/DownloadBundleWin.cpp (287431 => 287432)
--- trunk/Source/WebCore/platform/network/win/DownloadBundleWin.cpp 2021-12-24 21:02:24 UTC (rev 287431)
+++ trunk/Source/WebCore/platform/network/win/DownloadBundleWin.cpp 2021-12-24 21:39:38 UTC (rev 287432)
@@ -41,11 +41,6 @@
return 0xDECAF4EA;
}
-static void fileCloser(FILE* file)
-{
- fclose(file);
-};
-
const String& fileExtension()
{
static const NeverDestroyed<String> extension { ".download"_s };
@@ -69,7 +64,7 @@
LOG_ERROR("Failed to open file %s to append resume data", bundlePath.ascii().data());
return false;
}
- std::unique_ptr<FILE, decltype(&fileCloser)> bundle(bundlePtr, &fileCloser);
+ std::unique_ptr<FILE, decltype(&fclose)> bundle(bundlePtr, &fclose);
if (fwrite(resumeBytes, 1, resumeLength, bundle.get()) != resumeLength) {
LOG_ERROR("Failed to write resume data to the bundle - errno(%i)", errno);
@@ -104,7 +99,7 @@
LOG_ERROR("Failed to open file %s to get resume data", bundlePath.ascii().data());
return false;
}
- std::unique_ptr<FILE, decltype(&fileCloser)> bundle(bundlePtr, &fileCloser);
+ std::unique_ptr<FILE, decltype(&fclose)> bundle(bundlePtr, &fclose);
// Stat the file to get its size
struct _stat64 fileStat;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes