Bug 48851

Summary: [Chromium] Build failure with clang
Product: WebKit Reporter: Cosmin Truta <ctruta>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: dglazkov, sgjesse, thakis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Fix
dglazkov: review+, dglazkov: commit-queue+
Fix (fixed) dglazkov: review+, ctruta: commit-queue-

Description Cosmin Truta 2010-11-02 10:55:37 PDT
I tried building Chromium with clang, according to the instructions posted at
http://code.google.com/p/chromium/wiki/Clang

The build failed because of the following compiler warning-turned-error:
DumpRenderTree/chromium/TestShell.h:147:68: error: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

This was introduced in changeset 70537:
http://trac.webkit.org/changeset/70537
Comment 1 Cosmin Truta 2010-11-02 11:46:23 PDT
Created attachment 72708 [details]
Fix

Here is the fix.

Since gcc doesn't issue this warning by default, would it not be worth adding -Wtype-limits (and possibly others) to all CFLAGS, to ensure a smoother gcc <-> clang transition in the future?
Comment 2 Dimitri Glazkov (Google) 2010-11-02 11:57:39 PDT
Comment on attachment 72708 [details]
Fix

ok.
Comment 3 Cosmin Truta 2010-11-02 13:08:07 PDT
Created attachment 72723 [details]
Fix (fixed)

Oops, I accidentally made changes in the wrong git branch, and my previous patch turned out backwards.
Here is the correct fix.
Comment 4 Dimitri Glazkov (Google) 2010-11-02 13:11:06 PDT
Comment on attachment 72723 [details]
Fix (fixed)

ok.
Comment 5 Søren Gjesse 2010-11-02 14:07:07 PDT
Isn't this what is already fixed by https://bugs.webkit.org/show_bug.cgi?id=48414?
Comment 6 Cosmin Truta 2010-11-02 14:31:21 PDT
(In reply to comment #5)
> Isn't this what is already fixed by https://bugs.webkit.org/show_bug.cgi?id=48414?

Oh, yeah, it is...
I had a 1-day-old copy of WebKit that I should have refreshed...
Comment 7 Cosmin Truta 2010-11-02 14:35:20 PDT
Comment on attachment 72723 [details]
Fix (fixed)

Setting cq-.
This was already fixed yesterday in bug 48414, and I haven't noticed.
Comment 8 Cosmin Truta 2010-11-02 14:38:57 PDT

*** This bug has been marked as a duplicate of bug 48414 ***