Skip to content

Commit

Permalink
Fix compiling on gcc-4.6.
Browse files Browse the repository at this point in the history
This change removes invalid direct calls to constructors and replaces NULL to 0 as workarounds for a compiler bug of gcc 4.6.

Patch from Maarten Lankhorst <m.b.lankhorst@gmail.com>.

BUG=none
TEST=fix builds on gcc 4.6
Review URL: http://codereview.chromium.org/6596005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76046 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
hbono@chromium.org committed Feb 25, 2011
1 parent f51a7d9 commit 1c51cf7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ Ben Karel <eschew@gmail.com>
Sam McDonald <sam@sammcd.com>
Magnus Danielsson <fuzzac@gmail.com>
Kushal Pisavadia <kushi.p@gmail.com>
Maarten Lankhorst <m.b.lankhorst@gmail.com>
2 changes: 1 addition & 1 deletion chrome/browser/extensions/extension_service_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ TEST_F(ExtensionServiceTest, UpdatePendingExtension) {
ASSERT_TRUE(extension);

bool enabled = service_->GetExtensionById(kGoodId, false);
EXPECT_EQ(kGoodInitialState == Extension::ENABLED, enabled);
EXPECT_EQ(enabled, kGoodInitialState == Extension::ENABLED);
EXPECT_EQ(kGoodInitialState,
service_->extension_prefs()->GetExtensionState(extension->id()));
EXPECT_EQ(kGoodInitialIncognitoEnabled,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/prefs/session_startup_pref_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TEST_F(SessionStartupPrefTest, URLListManagedOverridesUser) {
EXPECT_EQ(3u, result.urls.size());

SessionStartupPref override_test =
SessionStartupPref::SessionStartupPref(SessionStartupPref::URLS);
SessionStartupPref(SessionStartupPref::URLS);
override_test.urls.push_back(GURL("dev.chromium.org"));
SessionStartupPref::SetStartupPref(pref_service_.get(), override_test);

Expand Down
6 changes: 3 additions & 3 deletions chrome/browser/translate/translate_manager_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ TEST_F(TranslateManagerTest, TestAllLanguages) {
ASSERT_LT(i, static_cast<size_t>(NUM_LANGUAGES));

std::string lang = LanguageCodeWithDialects(static_cast<Language>(i));
SCOPED_TRACE(::testing::Message::Message() << "Iteration " << i <<
SCOPED_TRACE(::testing::Message() << "Iteration " << i <<
" language=" << lang);

// We should not have a translate infobar.
Expand Down Expand Up @@ -1118,7 +1118,7 @@ TEST_F(TranslateManagerTest, BeforeTranslateExtraButtons) {
static_cast<TestingProfile*>(contents()->profile());
test_profile->set_off_the_record(true);
for (int i = 0; i < 8; ++i) {
SCOPED_TRACE(::testing::Message::Message() << "Iteration " << i <<
SCOPED_TRACE(::testing::Message() << "Iteration " << i <<
" incognito mode=" << test_profile->IsOffTheRecord());
SimulateNavigation(GURL("http://www.google.fr"), "Le Google", "fr", true);
infobar = GetTranslateInfoBar();
Expand Down Expand Up @@ -1150,7 +1150,7 @@ TEST_F(TranslateManagerTest, BeforeTranslateExtraButtons) {
// to be shown (in non incognito mode only).
test_profile->set_off_the_record(true);
for (int i = 0; i < 8; ++i) {
SCOPED_TRACE(::testing::Message::Message() << "Iteration " << i <<
SCOPED_TRACE(::testing::Message() << "Iteration " << i <<
" incognito mode=" << test_profile->IsOffTheRecord());
SimulateNavigation(GURL("http://www.google.de"), "Das Google", "de", true);
infobar = GetTranslateInfoBar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void KeywordEditorControllerTest::Init(bool simulate_load_failure) {

model_ = profile_->GetTemplateURLModel();
if (simulate_load_failure)
model_->OnWebDataServiceRequestDone(NULL, NULL);
model_->OnWebDataServiceRequestDone(0, NULL);

controller_.reset(new KeywordEditorController(profile_.get()));
controller_->table_model()->SetObserver(this);
Expand Down
2 changes: 1 addition & 1 deletion ppapi/proxy/ppb_context_3d_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Context3D::Context3D(const HostResource& resource)
: PluginResource(resource),
draw_(NULL),
read_(NULL),
transfer_buffer_id_(NULL) {
transfer_buffer_id_(0) {
}

Context3D::~Context3D() {
Expand Down

0 comments on commit 1c51cf7

Please sign in to comment.