Fix signed / unsigned warnings for ?: operators reported by Xcode 4.x clang compiler.

The patch is based on the report provided by github user Zakay.

BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9592030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10970 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent dbb95bc5
......@@ -525,7 +525,8 @@ Extension::Extension(const char* name,
int source_length)
: name_(name),
source_length_(source_length >= 0 ?
source_length : (source ? strlen(source) : 0)),
source_length :
(source ? static_cast<int>(strlen(source)) : 0)),
source_(source, source_length_),
dep_count_(dep_count),
deps_(deps),
......
......@@ -1348,12 +1348,13 @@ void HBinaryOperation::PrintDataTo(StringStream* stream) {
Range* HBitwise::InferRange(Zone* zone) {
if (op() == Token::BIT_XOR) return HValue::InferRange(zone);
const int32_t kDefaultMask = static_cast<int32_t>(0xffffffff);
int32_t left_mask = (left()->range() != NULL)
? left()->range()->Mask()
: 0xffffffff;
: kDefaultMask;
int32_t right_mask = (right()->range() != NULL)
? right()->range()->Mask()
: 0xffffffff;
: kDefaultMask;
int32_t result_mask = (op() == Token::BIT_AND)
? left_mask & right_mask
: left_mask | right_mask;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment