summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 23:18:46 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 23:18:46 +0000
commiteca8ea527628d494c527753aaa781f3b34337e8f (patch)
tree011485aa9422ba1abf35210c1543f8fd39982bac /net/disk_cache
parent3753f52d42975eaefcafca9fc0257ec24e161a9c (diff)
downloadchromium_src-eca8ea527628d494c527753aaa781f3b34337e8f.zip
chromium_src-eca8ea527628d494c527753aaa781f3b34337e8f.tar.gz
chromium_src-eca8ea527628d494c527753aaa781f3b34337e8f.tar.bz2
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
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/disk_cache_perftest.cc6
1 files changed, 2 insertions, 4 deletions
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<disk_cache::Addr*>(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;
}