Bug 40772 - Warnings in v8 bindings with possible bug
Summary: Warnings in v8 bindings with possible bug
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Dumitru Daniliuc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-17 05:37 PDT by Thomas Van Lenten
Modified: 2010-06-18 09:47 PDT (History)
2 users (show)

See Also:


Attachments
patch (1.91 KB, patch)
2010-06-18 01:15 PDT, Dumitru Daniliuc
dglazkov: review+
dumi: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Van Lenten 2010-06-17 05:37:24 PDT
We're trying to turn on -Wextra in for Chromium on the Mac.  All the core Chromium code is now clean, so we're down to a half dozen hits in WebKit and v8.  The v8 hits are (paths are from chromium build):

src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: In static member function 'static v8::Handle<v8::Value> WebCore::V8SQLResultSetRowList::itemCallback(const v8::Arguments&)':
src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:59: warning: comparison of unsigned expression < 0 is always false

Is putting a signed value into an unsigned and then checking for < 0.  Dropping the check would fix the warning, but the sign drop could be an real issue.


src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/npruntime.cpp: In function 'void _NPN_DeallocateObject(NPObject*)':
src/third_party/WebKit/WebCore/WebCore.gyp/../bindings/v8/npruntime.cpp:299: warning: comparison of unsigned expression >= 0 is always true

This is an assert for npObject->referenceCount being >= 0, but since referenceCount appears to be an uint32, the assert can probably just be dropped.
Comment 1 Dimitri Glazkov (Google) 2010-06-17 07:28:22 PDT
Dumi, could you take a look at the first one?

Yup, the second one we can just drop.
Comment 2 Dumitru Daniliuc 2010-06-18 01:15:06 PDT
Created attachment 59078 [details]
patch
Comment 3 Dimitri Glazkov (Google) 2010-06-18 07:40:12 PDT
Comment on attachment 59078 [details]
patch

ok.
Comment 4 Dumitru Daniliuc 2010-06-18 09:47:37 PDT
Landed as r61412.