From eca8ea527628d494c527753aaa781f3b34337e8f Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Tue, 14 Apr 2009 23:18:46 +0000 Subject: Fix strict aliasing warning in disk_cache_perftest. Review URL: http://codereview.chromium.org/67144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13717 0039d316-1c4b-4281-b951-d872f2087c98 --- net/disk_cache/disk_cache_perftest.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'net/disk_cache') diff --git a/net/disk_cache/disk_cache_perftest.cc b/net/disk_cache/disk_cache_perftest.cc index e6bc88d..088109d 100644 --- a/net/disk_cache/disk_cache_perftest.cc +++ b/net/disk_cache/disk_cache_perftest.cc @@ -217,10 +217,7 @@ TEST_F(DiskCacheTest, BlockFilesPerformance) { srand(seed); const int kNumEntries = 60000; - int32 buffer[kNumEntries]; - memset(buffer, 0, sizeof(buffer)); - disk_cache::Addr* address = reinterpret_cast(buffer); - ASSERT_EQ(sizeof(*address), sizeof(*buffer)); + disk_cache::Addr* address = new disk_cache::Addr[kNumEntries]; PerfTimeLogger timer1("Fill three block-files"); @@ -245,4 +242,5 @@ TEST_F(DiskCacheTest, BlockFilesPerformance) { timer2.Done(); MessageLoop::current()->RunAllPending(); + delete address; } -- cgit v1.1