diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-10 00:16:28 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-10 00:16:28 +0000 |
commit | 11b901ee17f1ef5aa41c70046b7a5360534c633d (patch) | |
tree | 9dd5ca2b4ec4864658218126afc2f813a2c32c68 /base | |
parent | 64f5c3c6952e4861a269dd8e0d396ecea584ffa1 (diff) | |
download | chromium_src-11b901ee17f1ef5aa41c70046b7a5360534c633d.zip chromium_src-11b901ee17f1ef5aa41c70046b7a5360534c633d.tar.gz chromium_src-11b901ee17f1ef5aa41c70046b7a5360534c633d.tar.bz2 |
Use gcc 4.2 for the Mac build. Fix up new warnings and errors pointed out
by gcc 4.2:
warning: 'C' has a field 'C::m_' whose type uses the anonymous namespace
warning: missing braces around initializer for 'S'
error: extra qualification 'C::' on member 'm'
Review URL: http://codereview.chromium.org/1675
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/file_util_unittest.cc | 3 | ||||
-rwxr-xr-x | base/gfx/platform_device_mac.cc | 2 | ||||
-rw-r--r-- | base/pr_time_unittest.cc | 3 | ||||
-rw-r--r-- | base/stats_table.cc | 18 |
4 files changed, 12 insertions, 14 deletions
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc index 3ebda65..a93eda3 100644 --- a/base/file_util_unittest.cc +++ b/base/file_util_unittest.cc @@ -132,8 +132,6 @@ const struct append_case { #endif }; -} // namespace - TEST_F(FileUtilTest, AppendToPath) { for (unsigned int i = 0; i < arraysize(append_cases); ++i) { const append_case& value = append_cases[i]; @@ -889,3 +887,4 @@ TEST_F(FileUtilTest, FileEnumeratorTest) { // (we don't care what). } +} // namespace diff --git a/base/gfx/platform_device_mac.cc b/base/gfx/platform_device_mac.cc index 6c8b0da..9185dae 100755 --- a/base/gfx/platform_device_mac.cc +++ b/base/gfx/platform_device_mac.cc @@ -57,7 +57,7 @@ void PlatformDeviceMac::LoadPathToCGContext(CGContextRef context, // type per call, so we just have to load up the geometry. CGContextBeginPath(context); - SkPoint points[4] = {0}; + SkPoint points[4] = { {0, 0}, {0, 0}, {0, 0}, {0, 0} }; SkPath::Iter iter(path, false); for (SkPath::Verb verb = iter.next(points); verb != SkPath::kDone_Verb; verb = iter.next(points)) { diff --git a/base/pr_time_unittest.cc b/base/pr_time_unittest.cc index aad0ccb..38c3140 100644 --- a/base/pr_time_unittest.cc +++ b/base/pr_time_unittest.cc @@ -42,8 +42,6 @@ class PRTimeTest : public testing::Test { PRTime comparison_time_local_; }; -} // namespace - // Tests the PR_ParseTimeString nspr helper function for // a variety of time strings. TEST_F(PRTimeTest, ParseTimeTest1) { @@ -238,3 +236,4 @@ TEST_F(PRTimeTest, ParseTimeTestEmpty) { EXPECT_FALSE(Time::FromString(L"", &parsed_time)); } +} // namespace diff --git a/base/stats_table.cc b/base/stats_table.cc index ba08f1c..14e4a89 100644 --- a/base/stats_table.cc +++ b/base/stats_table.cc @@ -70,14 +70,6 @@ const int kTableVersion = 0x13131313; // The name for un-named counters and threads in the table. const wchar_t kUnknownName[] = L"<unknown>"; -// Various header information contained in the memory mapped segment. -struct TableHeader { - int version; - int size; - int max_counters; - int max_threads; -}; - // Calculates delta to align an offset to the size of an int inline int AlignOffset(int offset) { return (sizeof(int) - (offset % sizeof(int))) % sizeof(int); @@ -115,6 +107,14 @@ static void SlotReturnFunction(void* data) { // clean and accessible. class StatsTablePrivate { public: + // Various header information contained in the memory mapped segment. + struct TableHeader { + int version; + int size; + int max_counters; + int max_threads; + }; + // Create the StatsTablePrivate based on expected size parameters. StatsTablePrivate(void* memory, int size, int max_threads, int max_counters); @@ -231,7 +231,7 @@ StatsTable::StatsTable(const std::wstring& name, int max_threads, int max_counters) : tls_index_(SlotReturnFunction) { int table_size = - AlignedSize(sizeof(TableHeader)) + + AlignedSize(sizeof(StatsTablePrivate::TableHeader)) + AlignedSize((max_counters * sizeof(wchar_t) * kMaxCounterNameLength)) + AlignedSize((max_threads * sizeof(wchar_t) * kMaxThreadNameLength)) + AlignedSize(max_threads * sizeof(int)) + |