[Webkit-unassigned] [Bug 189496] New: [Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 11 02:22:17 PDT 2018


            Bug ID: 189496
           Summary: [Win][Clang][ImageDiff] Fix compilation error and
                    warning of PlatformImageCairo.cpp
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: Hironori.Fujii at sony.com
                CC: lforschler at apple.com

[Win][Clang][ImageDiff] Fix compilation error and warning of PlatformImageCairo.cpp

While trying to build WebKit WinCairo port with the latest Clang (Bug 171618),
the following compilation error and warning is reported.

> [2/1360] Building CXX object Tools\ImageDiff\CMakeFiles\ImageDiffLib.dir\cairo\PlatformImageCairo.cpp.obj
> FAILED: Tools/ImageDiff/CMakeFiles/ImageDiffLib.dir/cairo/PlatformImageCairo.cpp.obj 
> C:\tools\llvm\bin\clang-cl.exe  (...) /FdTools\ImageDiff\CMakeFiles\ImageDiffLib.dir\ -c ..\..\Tools\ImageDiff\cairo\PlatformImageCairo.cpp
> ..\..\Tools\ImageDiff\cairo\PlatformImageCairo.cpp(46,22):  error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long long') to 'unsigned long' in initializer list [-Wc++11-narrowing]
>     } context { { }, imageSize, 0 };
>                      ^~~~~~~~~
> ..\..\Tools\ImageDiff\cairo\PlatformImageCairo.cpp(46,22):  note: insert an explicit cast to silence this issue
>     } context { { }, imageSize, 0 };
>                      ^~~~~~~~~
>                      static_cast<unsigned long>( )
> ..\..\Tools\ImageDiff\cairo\PlatformImageCairo.cpp(125,61):  warning: format specifies type 'unsigned __int64' (aka 'unsigned long long') but the argument has type 'unsigned long' [-Wformat]
>     fprintf(stdout, "Content-Length: %" FORMAT_SIZE_T "\n", context.writtenBytes);
>                                      ~~~~~~~~~~~~~~~~       ^~~~~~~~~~~~~~~~~~~~
> 1 warning and 1 error generated.

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/20180911/e416c046/attachment.html>

More information about the webkit-unassigned mailing list