summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcraig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-07 19:01:41 +0000
committercraig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-07 19:01:41 +0000
commit7e93e2f52a534ff2fb1434ae7bca88dc8bd8e4df (patch)
treecbc5f50dbf28f24d71383466e6a6cd6d4aef6aec
parent3ee8e02bec65d80ed1ae652470af1c97f1575559 (diff)
downloadchromium_src-7e93e2f52a534ff2fb1434ae7bca88dc8bd8e4df.zip
chromium_src-7e93e2f52a534ff2fb1434ae7bca88dc8bd8e4df.tar.gz
chromium_src-7e93e2f52a534ff2fb1434ae7bca88dc8bd8e4df.tar.bz2
Fix some gcc 4.4 issues when compiling with toolkit_views.
Most of these squash harmless compiler warnings but the custom_button.cc change fixes a real problem with the accelerator key bitmask calculation (+ preceeds << in terms of operator precedence) The change to tab_strip.cc is ugly but it fixes the following error: chrome/browser/views/tabs/tab_strip.cc: In member function ‘void TabStrip::StartRemoveTabAnimation(int, TabContents*)’: chrome/browser/views/tabs/tab_strip.cc:201: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false As an added bonus, this makes the Linux shared build of toolkit_views work too. Review URL: http://codereview.chromium.org/199025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25602 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/os_exchange_data_provider_gtk.cc10
-rw-r--r--chrome/browser/views/dialog_stubs_gtk.cc5
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc6
-rw-r--r--chrome/chrome.gyp7
-rw-r--r--views/controls/button/custom_button.cc4
-rw-r--r--views/widget/drop_target_gtk.cc2
6 files changed, 19 insertions, 15 deletions
diff --git a/app/os_exchange_data_provider_gtk.cc b/app/os_exchange_data_provider_gtk.cc
index f432c7c..5b32907 100644
--- a/app/os_exchange_data_provider_gtk.cc
+++ b/app/os_exchange_data_provider_gtk.cc
@@ -164,7 +164,7 @@ void OSExchangeDataProviderGtk::SetHtml(const std::wstring& html,
}
bool OSExchangeDataProviderGtk::GetString(std::wstring* data) const {
- if (formats_ & OSExchangeData::STRING == 0)
+ if ((formats_ & OSExchangeData::STRING) == 0)
return false;
*data = UTF16ToWideHack(string_);
return true;
@@ -172,7 +172,7 @@ bool OSExchangeDataProviderGtk::GetString(std::wstring* data) const {
bool OSExchangeDataProviderGtk::GetURLAndTitle(GURL* url,
std::wstring* title) const {
- if (formats_ & OSExchangeData::URL == 0)
+ if ((formats_ & OSExchangeData::URL) == 0)
return false;
if (!url_.is_valid())
return false;
@@ -183,7 +183,7 @@ bool OSExchangeDataProviderGtk::GetURLAndTitle(GURL* url,
}
bool OSExchangeDataProviderGtk::GetFilename(std::wstring* full_path) const {
- if (formats_ & OSExchangeData::FILE_NAME == 0)
+ if ((formats_ & OSExchangeData::FILE_NAME) == 0)
return false;
*full_path = UTF16ToWideHack(filename_);
return true;
@@ -202,7 +202,7 @@ bool OSExchangeDataProviderGtk::GetPickledData(GdkAtom format,
bool OSExchangeDataProviderGtk::GetFileContents(
std::wstring* filename,
std::string* file_contents) const {
- if (formats_ & OSExchangeData::FILE_CONTENTS == 0)
+ if ((formats_ & OSExchangeData::FILE_CONTENTS) == 0)
return false;
*filename = UTF16ToWideHack(filename_);
*file_contents = file_contents_;
@@ -211,7 +211,7 @@ bool OSExchangeDataProviderGtk::GetFileContents(
bool OSExchangeDataProviderGtk::GetHtml(std::wstring* html,
GURL* base_url) const {
- if (formats_ & OSExchangeData::HTML == 0)
+ if ((formats_ & OSExchangeData::HTML) == 0)
return false;
*html = UTF16ToWideHack(filename_);
*base_url = base_url_;
diff --git a/chrome/browser/views/dialog_stubs_gtk.cc b/chrome/browser/views/dialog_stubs_gtk.cc
index 0fe25e5..8df1833 100644
--- a/chrome/browser/views/dialog_stubs_gtk.cc
+++ b/chrome/browser/views/dialog_stubs_gtk.cc
@@ -46,11 +46,6 @@ void ShowHtmlDialogView(gfx::NativeWindow parent, Browser* browser,
NOTIMPLEMENTED();
}
-FindBar* CreateFindBar(BrowserView* browser_view) {
- NOTIMPLEMENTED();
- return NULL;
-}
-
void ShowPasswordsExceptionsWindowView(Profile* profile) {
NOTIMPLEMENTED();
}
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 3ff6d45..d615e7a 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -36,6 +36,12 @@
#undef min
#undef max
+#if defined(COMPILER_GCC)
+// Squash false positive signed overflow warning in GenerateStartAndEndWidths
+// when doing 'start_tab_count < end_tab_count'.
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#endif
+
using views::DropTargetEvent;
static const int kDefaultAnimationDurationMs = 100;
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 5aa5234..629321c 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -2532,8 +2532,6 @@
['include', '^browser/gtk/import_lock_dialog_gtk.h'],
['include', '^browser/gtk/keyword_editor_view.cc'],
['include', '^browser/gtk/keyword_editor_view.h'],
- ['include', '^browser/gtk/list_store_favicon_loader.cc'],
- ['include', '^browser/gtk/list_store_favicon_loader.h'],
['include', '^browser/gtk/menu_gtk.cc'],
['include', '^browser/gtk/menu_gtk.h'],
['include', '^browser/gtk/tab_contents_drag_source.cc'],
@@ -2550,6 +2548,11 @@
['exclude', '^browser/tab_contents/tab_contents_view_gtk.h'],
['exclude', '^browser/tab_contents/render_view_context_menu_gtk.cc'],
['exclude', '^browser/tab_contents/render_view_context_menu_gtk.h'],
+ # This compiles but has Linux shared build linking issues due to
+ # missing rsa_private_key functions.
+ ['exclude', '^browser/extensions/extension_creator.cc'],
+ # This compiles but it needs extension_creator.
+ ['exclude', '^browser/extensions/pack_extension_job.cc'],
],
}],
['chromeos==1',{
diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc
index 69ac840..f9a58f6 100644
--- a/views/controls/button/custom_button.cc
+++ b/views/controls/button/custom_button.cc
@@ -96,8 +96,8 @@ bool CustomButton::AcceleratorPressed(const Accelerator& accelerator) {
memset(&gdk_key, 0, sizeof(GdkEventKey));
gdk_key.type = GDK_KEY_RELEASE;
gdk_key.keyval = accelerator.GetKeyCode();
- gdk_key.state = accelerator.IsAltDown() << 3 +
- accelerator.IsCtrlDown() << 2 +
+ gdk_key.state = (accelerator.IsAltDown() << 3) +
+ (accelerator.IsCtrlDown() << 2) +
accelerator.IsShiftDown();
KeyEvent key_event(&gdk_key, false);
#endif
diff --git a/views/widget/drop_target_gtk.cc b/views/widget/drop_target_gtk.cc
index d262e3e..2947e63 100644
--- a/views/widget/drop_target_gtk.cc
+++ b/views/widget/drop_target_gtk.cc
@@ -302,7 +302,7 @@ void DropTargetGtk::RequestFormats(GdkDragContext* context,
requested_formats_ |= OSExchangeData::FILE_CONTENTS;
NOTIMPLEMENTED();
}
- if ((formats & OSExchangeData::FILE_NAME != 0) &&
+ if (((formats & OSExchangeData::FILE_NAME) != 0) &&
(requested_formats_ & OSExchangeData::FILE_NAME) == 0) {
requested_formats_ |= OSExchangeData::FILE_NAME;
NOTIMPLEMENTED();