diff options
author | craig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 16:27:18 +0000 |
---|---|---|
committer | craig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 16:27:18 +0000 |
commit | 8b8fab971151ba246c0930fa25c68b705f6a6c0b (patch) | |
tree | 0c6a51a8823d8fa36636e16ffa5e85a480c8716d /chrome/browser | |
parent | 0d75bad6ecfdb9c7611f1001c5a1e9a0347b2337 (diff) | |
download | chromium_src-8b8fab971151ba246c0930fa25c68b705f6a6c0b.zip chromium_src-8b8fab971151ba246c0930fa25c68b705f6a6c0b.tar.gz chromium_src-8b8fab971151ba246c0930fa25c68b705f6a6c0b.tar.bz2 |
Linux: fix a bunch of NULL vs. 0 issues spotted by gcc 4.5.
There are more gcc 4.5 issues to be solved so GYP_DEFINES=='werror='
is still required to build with 4.5 even with these changes.
BUG=66652
TEST=compiles with gcc 4.5 and trybots
Review URL: http://codereview.chromium.org/6186008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/automation/automation_provider_observers.cc | 2 | ||||
-rw-r--r-- | chrome/browser/gtk/options/languages_page_gtk_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/history/top_sites.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ppapi_plugin_process_host.cc | 8 | ||||
-rw-r--r-- | chrome/browser/process_singleton_uitest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sync/syncable/syncable.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/tabs/dock_info_unittest.cc | 4 |
7 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index 925a1bf..c6719bb 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -1431,7 +1431,7 @@ NTPInfoObserver::NTPInfoObserver( : automation_(automation), reply_message_(reply_message), consumer_(consumer), - request_(NULL), + request_(0), ntp_info_(new DictionaryValue) { top_sites_ = automation_->profile()->GetTopSites(); if (!top_sites_) { diff --git a/chrome/browser/gtk/options/languages_page_gtk_unittest.cc b/chrome/browser/gtk/options/languages_page_gtk_unittest.cc index d861c35..0cb6298 100644 --- a/chrome/browser/gtk/options/languages_page_gtk_unittest.cc +++ b/chrome/browser/gtk/options/languages_page_gtk_unittest.cc @@ -256,7 +256,7 @@ TEST_F(LanguagesPageGtkTest, EnableSpellChecking) { gtk_button_clicked(GTK_BUTTON(page.enable_spellchecking_checkbox_)); EXPECT_EQ(FALSE, gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(page.enable_spellchecking_checkbox_))); - EXPECT_EQ(false, profile_->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); + EXPECT_FALSE(profile_->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck)); gtk_button_clicked(GTK_BUTTON(page.enable_spellchecking_checkbox_)); EXPECT_EQ(TRUE, gtk_toggle_button_get_active( diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc index 1635523..a1c0a17 100644 --- a/chrome/browser/history/top_sites.cc +++ b/chrome/browser/history/top_sites.cc @@ -443,7 +443,7 @@ void TopSites::DiffMostVisited(const MostVisitedURLList& old_list, CancelableRequestProvider::Handle TopSites::StartQueryForMostVisited() { DCHECK(loaded_); if (!profile_) - return NULL; + return 0; HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); // |hs| may be null during unit tests. @@ -454,7 +454,7 @@ CancelableRequestProvider::Handle TopSites::StartQueryForMostVisited() { &cancelable_consumer_, NewCallback(this, &TopSites::OnTopSitesAvailableFromHistory)); } - return NULL; + return 0; } TopSites::~TopSites() { diff --git a/chrome/browser/ppapi_plugin_process_host.cc b/chrome/browser/ppapi_plugin_process_host.cc index c90d1f4..225cc80 100644 --- a/chrome/browser/ppapi_plugin_process_host.cc +++ b/chrome/browser/ppapi_plugin_process_host.cc @@ -28,7 +28,7 @@ void PpapiPluginProcessHost::Init(const FilePath& path, reply_msg_.reset(reply_msg); if (!CreateChannel()) { - ReplyToRenderer(NULL, IPC::ChannelHandle()); + ReplyToRenderer(base::kNullProcessHandle, IPC::ChannelHandle()); return; } @@ -38,7 +38,7 @@ void PpapiPluginProcessHost::Init(const FilePath& path, FilePath exe_path = ChildProcessHost::GetChildPath(plugin_launcher.empty()); if (exe_path.empty()) { - ReplyToRenderer(NULL, IPC::ChannelHandle()); + ReplyToRenderer(base::kNullProcessHandle, IPC::ChannelHandle()); return; } @@ -92,13 +92,13 @@ void PpapiPluginProcessHost::OnChannelConnected(int32 peer_pid) { PpapiMsg_LoadPlugin* msg = new PpapiMsg_LoadPlugin( plugins_renderer_handle, plugin_path_, filter_->render_process_id()); if (!Send(msg)) // Just send an empty handle on failure. - ReplyToRenderer(NULL, IPC::ChannelHandle()); + ReplyToRenderer(base::kNullProcessHandle, IPC::ChannelHandle()); // This function will result in OnChannelCreated getting called to finish. } void PpapiPluginProcessHost::OnChannelError() { if (reply_msg_.get()) - ReplyToRenderer(NULL, IPC::ChannelHandle()); + ReplyToRenderer(base::kNullProcessHandle, IPC::ChannelHandle()); } void PpapiPluginProcessHost::OnPluginLoaded( diff --git a/chrome/browser/process_singleton_uitest.cc b/chrome/browser/process_singleton_uitest.cc index 38a0e48..f3ea3b4 100644 --- a/chrome/browser/process_singleton_uitest.cc +++ b/chrome/browser/process_singleton_uitest.cc @@ -38,7 +38,7 @@ class ChromeStarter : public base::RefCountedThreadSafe<ChromeStarter> { explicit ChromeStarter(int timeout_ms, const FilePath& user_data_dir) : ready_event_(false /* manual */, false /* signaled */), done_event_(false /* manual */, false /* signaled */), - process_handle_(NULL), + process_handle_(base::kNullProcessHandle), process_terminated_(false), timeout_ms_(timeout_ms), user_data_dir_(user_data_dir) { diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc index 2794efa..60140ac 100644 --- a/chrome/browser/sync/syncable/syncable.cc +++ b/chrome/browser/sync/syncable/syncable.cc @@ -1087,7 +1087,7 @@ BaseTransaction::BaseTransaction(Directory* directory) dirkernel_(NULL), name_(NULL), source_file_(NULL), - line_(NULL), + line_(0), writer_(INVALID) { } diff --git a/chrome/browser/ui/tabs/dock_info_unittest.cc b/chrome/browser/ui/tabs/dock_info_unittest.cc index ee4557e..8bb52a5 100644 --- a/chrome/browser/ui/tabs/dock_info_unittest.cc +++ b/chrome/browser/ui/tabs/dock_info_unittest.cc @@ -101,7 +101,7 @@ TEST(DockInfoTest, IsCloseToMonitorPoint) { TEST(DockInfoTest, IsValidForPoint) { DockInfo d; - EXPECT_EQ(false, d.IsValidForPoint(gfx::Point(0, 0))); + EXPECT_FALSE(d.IsValidForPoint(gfx::Point(0, 0))); d.set_monitor_bounds(gfx::Rect(0, 0, kPopupWidth, kPopupHeight)); d.set_hot_spot(gfx::Point(0, 0)); d.set_type(DockInfo::LEFT_HALF); @@ -126,7 +126,7 @@ TEST(DockInfoTest, equals) { DockInfo dd; EXPECT_EQ(true, d.equals(dd)); d.set_type(DockInfo::MAXIMIZE); - EXPECT_EQ(false, d.equals(dd)); + EXPECT_FALSE(d.equals(dd)); } TEST(DockInfoTest, CheckMonitorPoint) { |