Bug 178544

Summary: -Wsign-compare triggered by MallocBench
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: Tools / TestsAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cdumez, commit-queue, lforschler, mcatanzaro, rniwa, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Michael Catanzaro 2017-10-19 14:20:40 PDT
I see a warning now that MallocBench is enabled for Linux:

In file included from ../../PerformanceTests/MallocBench/MallocBench/Interpreter.cpp:28:0:
../../PerformanceTests/MallocBench/MallocBench/Interpreter.cpp: In constructor ‘Interpreter::Interpreter(const char*, bool, bool)’:
../../PerformanceTests/MallocBench/MallocBench/Interpreter.cpp:64:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     assert(m_opCount * sizeof(Op) == buf.st_size);
            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

buf.st_size is an off_t, which is signed, so I think we should do static_cast<size_t>(buf.st_size).
Comment 1 Michael Catanzaro 2017-10-19 14:22:55 PDT
Created attachment 324284 [details]
Patch
Comment 2 WebKit Commit Bot 2017-10-19 18:48:00 PDT
Comment on attachment 324284 [details]
Patch

Clearing flags on attachment: 324284

Committed r223733: <https://trac.webkit.org/changeset/223733>
Comment 3 WebKit Commit Bot 2017-10-19 18:48:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2017-11-15 13:01:39 PST
<rdar://problem/35568633>