summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 14:59:35 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-18 14:59:35 +0000
commit6b1831a453e6978482bf29da9185150352c8c7f7 (patch)
tree758127612ba660f1e80068d6a28e4812605b2b29 /chrome
parentf6d3e11d42746c43869f9c3066ca60d585489cd0 (diff)
downloadchromium_src-6b1831a453e6978482bf29da9185150352c8c7f7.zip
chromium_src-6b1831a453e6978482bf29da9185150352c8c7f7.tar.gz
chromium_src-6b1831a453e6978482bf29da9185150352c8c7f7.tar.bz2
Fixing a few minor issues found during static analysis of the Chromium codebase.
find_bar_controller.cc: Unused local variable created. hwnd_view.cc: The local definition of parent overshadows param passed in. google_update.cc: Uninitialized member variable. webframe_impl.cc: The if was overly constrained. At the top of the function there is an if (reset) { ... return; } so we don't need to check for !reset in the next if statement. This functionality is covered by a ui_test, which passes with this change. Review URL: http://codereview.chromium.org/42321 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/find_bar_controller.cc1
-rw-r--r--chrome/browser/google_update.cc5
-rw-r--r--chrome/views/controls/hwnd_view.cc6
3 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/find_bar_controller.cc b/chrome/browser/find_bar_controller.cc
index 81e759b..c9c6d51 100644
--- a/chrome/browser/find_bar_controller.cc
+++ b/chrome/browser/find_bar_controller.cc
@@ -114,7 +114,6 @@ void FindBarController::Observe(NotificationType type,
if (Source<TabContents>(source).ptr() == web_contents_) {
find_bar_->UpdateUIForFindResult(web_contents_->find_result(),
web_contents_->find_text());
- FindNotificationDetails details = web_contents_->find_result();
}
} else if (type == NotificationType::NAV_ENTRY_COMMITTED) {
NavigationController* source_controller =
diff --git a/chrome/browser/google_update.cc b/chrome/browser/google_update.cc
index 70ee2ab..fceede8 100644
--- a/chrome/browser/google_update.cc
+++ b/chrome/browser/google_update.cc
@@ -13,7 +13,6 @@
#include "base/task.h"
#include "base/thread.h"
#include "base/win_util.h"
-
#include "chrome/app/client_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/installer/util/google_update_constants.h"
@@ -98,7 +97,9 @@ class GoogleUpdateJobObserver
COM_INTERFACE_ENTRY(IJobObserver)
END_COM_MAP()
- GoogleUpdateJobObserver() {}
+ GoogleUpdateJobObserver()
+ : result_(UPGRADE_ERROR) {
+ }
virtual ~GoogleUpdateJobObserver() {}
// Notifications from Google Update:
diff --git a/chrome/views/controls/hwnd_view.cc b/chrome/views/controls/hwnd_view.cc
index a376c8b..cc9df6d 100644
--- a/chrome/views/controls/hwnd_view.cc
+++ b/chrome/views/controls/hwnd_view.cc
@@ -127,7 +127,7 @@ void HWNDView::UpdateHWNDBounds() {
// it.
::SetWindowPos(hwnd_, 0, 0, 0, 0, 0,
SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER |
- SWP_NOREDRAW | SWP_NOOWNERZORDER );
+ SWP_NOREDRAW | SWP_NOOWNERZORDER);
}
}
@@ -150,9 +150,9 @@ void HWNDView::ViewHierarchyChanged(bool is_add, View *parent, View *child) {
if (hwnd_) {
Widget* widget = GetWidget();
if (is_add && widget) {
- HWND parent = ::GetParent(hwnd_);
+ HWND parent_hwnd = ::GetParent(hwnd_);
HWND widget_hwnd = widget->GetNativeView();
- if (parent != widget_hwnd) {
+ if (parent_hwnd != widget_hwnd) {
::SetParent(hwnd_, widget_hwnd);
}
if (IsVisibleInRootView())