Bug 15764 - compiler warning
Summary: compiler warning
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Other OS X 10.4
: P2 Trivial
Assignee: David Carson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-30 07:39 PDT by David Carson
Modified: 2007-11-02 16:27 PDT (History)
0 users

See Also:


Attachments
patch (1.08 KB, patch)
2007-10-30 07:48 PDT, David Carson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carson 2007-10-30 07:39:11 PDT
Some compilers give a warning for the following function:

inline bool JSValue::isNumber() const
{
    return JSImmediate::isNumber(this) || !JSImmediate::isImmediate(this) && asCell()->isNumber();
}

"warning: suggest parentheses around && within ||"

This file is compiled into a lot of the JSCore files and the warning is seen for every file.
Comment 1 David Carson 2007-10-30 07:48:56 PDT
Created attachment 16948 [details]
patch

insert suggested braces, also makes it easier to read.
Comment 2 Darin Adler 2007-10-30 07:56:15 PDT
Comment on attachment 16948 [details]
patch

Parentheses look fine. But not the spaces within the parentheses! We don't use spaces there in our expressions.
Comment 3 Darin Adler 2007-11-02 16:27:38 PDT
Committed revision 27381.