diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2015-09-21 04:17:28 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2015-09-21 04:17:28 +0800 |
commit | 9d84ec65ed3c80ee410bf7fe9762452bcf22aa41 (patch) | |
tree | 4b54079aab0da5b3dc9198f537f46571633248b9 | |
parent | 6ec3d6b56a4fc6c9398bd8e6ede85c499c5f184b (diff) | |
download | freebsd-ports-gnome-9d84ec65ed3c80ee410bf7fe9762452bcf22aa41.tar.gz freebsd-ports-gnome-9d84ec65ed3c80ee410bf7fe9762452bcf22aa41.tar.zst freebsd-ports-gnome-9d84ec65ed3c80ee410bf7fe9762452bcf22aa41.zip |
- Fix warnings generated by recent snapshot of Clang 3.7.0, including:
- Printing non-void pointers with %p.
- Left-shifting negative numbers.
PR: 202530
Submitted by: dim
-rw-r--r-- | lang/v8/files/patch-src-checks.h | 11 | ||||
-rw-r--r-- | lang/v8/files/patch-src-deoptimizer.cc | 29 | ||||
-rw-r--r-- | lang/v8/files/patch-src-ia32-code-stubs-ia32.cc | 11 | ||||
-rw-r--r-- | lang/v8/files/patch-src-ia32-disasm-ia32.cc | 11 | ||||
-rw-r--r-- | lang/v8/files/patch-src-ia32-ic-ia32.cc | 12 | ||||
-rw-r--r-- | lang/v8/files/patch-src-liveedit.cc | 11 | ||||
-rw-r--r-- | lang/v8/files/patch-src-objects.h | 22 |
7 files changed, 107 insertions, 0 deletions
diff --git a/lang/v8/files/patch-src-checks.h b/lang/v8/files/patch-src-checks.h new file mode 100644 index 000000000000..76be204b96d2 --- /dev/null +++ b/lang/v8/files/patch-src-checks.h @@ -0,0 +1,11 @@ +--- src/checks.h.orig 2013-05-01 12:56:29 UTC ++++ src/checks.h +@@ -248,7 +248,7 @@ template <int> class StaticAssertionHelp + #define STATIC_CHECK(test) \ + typedef \ + StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>((test))>)> \ +- SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) ++ SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) __attribute__((__unused__)) + + + extern bool FLAG_enable_slow_asserts; diff --git a/lang/v8/files/patch-src-deoptimizer.cc b/lang/v8/files/patch-src-deoptimizer.cc new file mode 100644 index 000000000000..dc2e817a610e --- /dev/null +++ b/lang/v8/files/patch-src-deoptimizer.cc @@ -0,0 +1,29 @@ +--- src/deoptimizer.cc.orig 2013-05-01 12:56:29 UTC ++++ src/deoptimizer.cc +@@ -1392,7 +1392,7 @@ void Deoptimizer::MaterializeHeapObjects + PrintF("Materializing a new heap number %p [%e] in slot %p\n", + reinterpret_cast<void*>(*num), + d.value(), +- d.slot_address()); ++ reinterpret_cast<void*>(d.slot_address())); + } + Memory::Object_at(d.slot_address()) = *num; + } +@@ -1474,7 +1474,7 @@ void Deoptimizer::MaterializeHeapNumbers + "for parameter slot #%d\n", + reinterpret_cast<void*>(*num), + d.value(), +- d.slot_address(), ++ reinterpret_cast<void*>(d.slot_address()), + index); + } + +@@ -1490,7 +1490,7 @@ void Deoptimizer::MaterializeHeapNumbers + "for expression slot #%d\n", + reinterpret_cast<void*>(*num), + d.value(), +- d.slot_address(), ++ reinterpret_cast<void*>(d.slot_address()), + index); + } + diff --git a/lang/v8/files/patch-src-ia32-code-stubs-ia32.cc b/lang/v8/files/patch-src-ia32-code-stubs-ia32.cc new file mode 100644 index 000000000000..7769977b44c8 --- /dev/null +++ b/lang/v8/files/patch-src-ia32-code-stubs-ia32.cc @@ -0,0 +1,11 @@ +--- src/ia32/code-stubs-ia32.cc.orig 2013-05-01 12:56:29 UTC ++++ src/ia32/code-stubs-ia32.cc +@@ -5650,7 +5650,7 @@ void StringCharFromCodeGenerator::Genera + ASSERT(IsPowerOf2(String::kMaxOneByteCharCode + 1)); + __ test(code_, + Immediate(kSmiTagMask | +- ((~String::kMaxOneByteCharCode) << kSmiTagSize))); ++ ((~String::kMaxOneByteCharCodeU) << kSmiTagSize))); + __ j(not_zero, &slow_case_); + + Factory* factory = masm->isolate()->factory(); diff --git a/lang/v8/files/patch-src-ia32-disasm-ia32.cc b/lang/v8/files/patch-src-ia32-disasm-ia32.cc new file mode 100644 index 000000000000..a82a393f2d15 --- /dev/null +++ b/lang/v8/files/patch-src-ia32-disasm-ia32.cc @@ -0,0 +1,11 @@ +--- src/ia32/disasm-ia32.cc.orig 2013-05-01 12:56:29 UTC ++++ src/ia32/disasm-ia32.cc +@@ -1707,7 +1707,7 @@ int Disassembler::ConstantPoolSizeAt(byt + buffer[0] = '\0'; + byte* prev_pc = pc; + pc += d.InstructionDecode(buffer, pc); +- fprintf(f, "%p", prev_pc); ++ fprintf(f, "%p", reinterpret_cast<void*>(prev_pc)); + fprintf(f, " "); + + for (byte* bp = prev_pc; bp < pc; bp++) { diff --git a/lang/v8/files/patch-src-ia32-ic-ia32.cc b/lang/v8/files/patch-src-ia32-ic-ia32.cc new file mode 100644 index 000000000000..1a38139abbe3 --- /dev/null +++ b/lang/v8/files/patch-src-ia32-ic-ia32.cc @@ -0,0 +1,12 @@ +--- src/ia32/ic-ia32.cc.orig 2013-05-01 12:56:29 UTC ++++ src/ia32/ic-ia32.cc +@@ -1657,7 +1657,8 @@ void PatchInlinedSmiCode(Address address + int8_t delta = *reinterpret_cast<int8_t*>(delta_address); + if (FLAG_trace_ic) { + PrintF("[ patching ic at %p, test=%p, delta=%d\n", +- address, test_instruction_address, delta); ++ reinterpret_cast<void*>(address), ++ reinterpret_cast<void*>(test_instruction_address), delta); + } + + // Patch with a short conditional jump. Enabling means switching from a short diff --git a/lang/v8/files/patch-src-liveedit.cc b/lang/v8/files/patch-src-liveedit.cc new file mode 100644 index 000000000000..aa4d9310f462 --- /dev/null +++ b/lang/v8/files/patch-src-liveedit.cc @@ -0,0 +1,11 @@ +--- src/liveedit.cc.orig 2013-05-01 12:56:29 UTC ++++ src/liveedit.cc +@@ -203,7 +203,7 @@ class Differencer { + + static const int kDirectionSizeBits = 2; + static const int kDirectionMask = (1 << kDirectionSizeBits) - 1; +- static const int kEmptyCellValue = -1 << kDirectionSizeBits; ++ static const int kEmptyCellValue = -(1 << kDirectionSizeBits); + + // This method only holds static assert statement (unfortunately you cannot + // place one in class scope). diff --git a/lang/v8/files/patch-src-objects.h b/lang/v8/files/patch-src-objects.h new file mode 100644 index 000000000000..f6a1c20f006d --- /dev/null +++ b/lang/v8/files/patch-src-objects.h @@ -0,0 +1,22 @@ +--- src/objects.h.orig 2013-05-01 12:56:29 UTC ++++ src/objects.h +@@ -5573,7 +5573,7 @@ class Map: public HeapObject { + static const int kElementsKindBitCount = 5; + + // Derived values from bit field 2 +- static const int kElementsKindMask = (-1 << kElementsKindShift) & ++ static const int kElementsKindMask = -(1 << kElementsKindShift) & + ((1 << (kElementsKindShift + kElementsKindBitCount)) - 1); + static const int8_t kMaximumBitField2FastElementValue = static_cast<int8_t>( + (FAST_ELEMENTS + 1) << Map::kElementsKindShift) - 1; +@@ -7580,8 +7580,8 @@ class Name: public HeapObject { + STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); + + static const int kContainsCachedArrayIndexMask = +- (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | +- kIsNotArrayIndexMask; ++ (~static_cast<unsigned>(kMaxCachedArrayIndexLength) << ++ kArrayIndexHashLengthShift) | kIsNotArrayIndexMask; + + // Value of empty hash field indicating that the hash is not computed. + static const int kEmptyHashField = |