From 1dab15313acce310a36f9f48d3e186a1bba33d5f Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Sat, 12 Nov 2011 00:06:03 +0000 Subject: [PATCH] Linux: Fix gcc 4.6 and 64 bit compile errors (issue #40). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@374 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef.gyp | 9 +++++++++ libcef/browser_webview_delegate_gtk.cc | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cef.gyp b/cef.gyp index 96ab3e179..b6a0b36af 100644 --- a/cef.gyp +++ b/cef.gyp @@ -9,6 +9,15 @@ 'repack_locales_cmd': ['python', 'tools/repack_locales.py'], 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cef', }, + 'conditions': [ + [ 'os_posix==1 and OS!="mac" and OS!="android" and gcc_version==46', { + 'target_defaults': { + # Disable warnings about c++0x compatibility, as some names (such + # as nullptr) conflict with upcoming c++0x types. + 'cflags_cc': ['-Wno-c++0x-compat'], + }, + }], + ], 'includes': [ # Bring in the source file lists for cefclient. 'cef_paths.gypi', diff --git a/libcef/browser_webview_delegate_gtk.cc b/libcef/browser_webview_delegate_gtk.cc index 1b898969c..a846386f9 100644 --- a/libcef/browser_webview_delegate_gtk.cc +++ b/libcef/browser_webview_delegate_gtk.cc @@ -121,7 +121,8 @@ static GtkWidget* MenuItemCreate(GtkWidget* parent_menu, const char* name, { GtkWidget* menu_item = gtk_menu_item_new_with_label(name); - g_object_set_data(G_OBJECT(menu_item), "menu_id", (gpointer)id); + g_object_set_data(G_OBJECT(menu_item), "menu_id", + reinterpret_cast(id)); g_signal_connect(G_OBJECT(menu_item), "activate", G_CALLBACK(MenuItemHandle), (gpointer)webViewDelegate); gtk_menu_shell_append(GTK_MENU_SHELL(parent_menu), menu_item);