Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: src/objects-inl.h

Issue 2804033005: Suppress incorrect warning (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 733969381508cfaf87726c190a9af5b3fa870d35..3608da1c3d992c8366b4cda2a56bbeb6d72ab7c6 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -964,6 +964,14 @@ class SeqOneByteSubStringKey : public HashTableKey {
DCHECK(string_->IsSeqOneByteString());
}
+// VS 2017 on official builds gives this spurious warning:
+// warning C4789: buffer 'key' of size 16 bytes will be overrun; 4 bytes will
+// be written starting at offset 16
+// https://bugs.chromium.org/p/v8/issues/detail?id=6068
+#if defined(V8_CC_MSVC)
+#pragma warning(push)
+#pragma warning(disable : 4789)
+#endif
uint32_t Hash() override {
DCHECK(length_ >= 0);
DCHECK(from_ + length_ <= string_->length());
@@ -974,6 +982,9 @@ class SeqOneByteSubStringKey : public HashTableKey {
DCHECK(result != 0); // Ensure that the hash value of 0 is never computed.
return result;
}
+#if defined(V8_CC_MSVC)
+#pragma warning(pop)
+#endif
uint32_t HashForObject(Object* other) override {
return String::cast(other)->Hash();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698