WebKit Bugzilla
Attachment 349389 Details for
Bug 189496
: [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189496-20180911183846.patch (text/plain), 2.73 KB, created by
Fujii Hironori
on 2018-09-11 02:38:47 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-09-11 02:38:47 PDT
Size:
2.73 KB
patch
obsolete
>Subversion Revision: 235886 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 7a179653bb5c93d6799991a46c611fec4f329b9d..5032a8596cdce0c16bb7e406ca0e16895da15125 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2018-09-11 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp >+ https://bugs.webkit.org/show_bug.cgi?id=189496 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * ImageDiff/cairo/PlatformImageCairo.cpp: >+ (ImageDiff::PlatformImage::createFromStdin): Removed unnecessary ReadContext struct. >+ (ImageDiff::PlatformImage::writeAsPNGToStdout): Use '%lu' format type specifier for unsigned long. >+ > 2018-09-10 Michael Saboff <msaboff@apple.com> > > Test262 failure with Named Capture Groups - using a reference before the group is defined >diff --git a/Tools/ImageDiff/cairo/PlatformImageCairo.cpp b/Tools/ImageDiff/cairo/PlatformImageCairo.cpp >index b8dc8f0a20f9e8f90ac1ad59dd14602c7734d571..9ad0fd1dacf2d66017f358535cef01f6a843bae5 100644 >--- a/Tools/ImageDiff/cairo/PlatformImageCairo.cpp >+++ b/Tools/ImageDiff/cairo/PlatformImageCairo.cpp >@@ -29,30 +29,15 @@ > #include <stdio.h> > #include <stdlib.h> > >-#ifdef _WIN32 >-#define FORMAT_SIZE_T "Iu" >-#else >-#define FORMAT_SIZE_T "zu" >-#endif >- > namespace ImageDiff { > > std::unique_ptr<PlatformImage> PlatformImage::createFromStdin(size_t imageSize) > { >- struct ReadContext { >- char buffer[2048]; >- unsigned long incomingBytes; >- unsigned long readBytes; >- } context { { }, imageSize, 0 }; >- > cairo_surface_t* surface = cairo_image_surface_create_from_png_stream( >- [](void* closure, unsigned char* data, unsigned length) -> cairo_status_t { >- auto& context = *static_cast<ReadContext*>(closure); >- context.readBytes += length; >- >+ [](void*, unsigned char* data, unsigned length) -> cairo_status_t { > size_t readBytes = fread(data, 1, length, stdin); > return readBytes == length ? CAIRO_STATUS_SUCCESS : CAIRO_STATUS_READ_ERROR; >- }, &context); >+ }, nullptr); > > if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) { > cairo_surface_destroy(surface); >@@ -122,7 +107,7 @@ void PlatformImage::writeAsPNGToStdout() > context.writtenBytes += length; > return CAIRO_STATUS_SUCCESS; > }, &context); >- fprintf(stdout, "Content-Length: %" FORMAT_SIZE_T "\n", context.writtenBytes); >+ fprintf(stdout, "Content-Length: %lu\n", context.writtenBytes); > cairo_surface_write_to_png_stream(m_image, > [](void*, const unsigned char* data, unsigned length) -> cairo_status_t { > size_t writtenBytes = fwrite(data, 1, length, stdout);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189496
: 349389