PKGBUILDs/community/mysql-workbench/0002-fix-compilation-with-gcc-6.2.1.patch

63 lines
1.9 KiB
Diff
Raw Normal View History

2016-10-13 18:14:20 +00:00
From 743c9cfb9d95f4dfcf2d4e1dc412fd5495100aac Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Thu, 13 Oct 2016 10:56:55 +0200
Subject: [PATCH 1/1] fix compilation with gcc 6.2.1
Compilation fails with recent versions of gcc with:
error: cannot convert 'Glib::RefPtr<Gdk::Colormap>' to 'bool' in
assignment
and
error: no match for 'operator!=' (operand types are
'Glib::RefPtr<Gdk::Window>' and 'int')
This fixes compilation with gcc 6.2.1.
Signed-off-by: Christian Hesse <mail@eworm.de>
---
library/forms/gtk/src/lf_popover.cpp | 4 ++--
library/forms/gtk/src/lf_popup.cpp | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/library/forms/gtk/src/lf_popover.cpp b/library/forms/gtk/src/lf_popover.cpp
index 1a659a6..7502811 100644
--- a/library/forms/gtk/src/lf_popover.cpp
+++ b/library/forms/gtk/src/lf_popover.cpp
@@ -380,7 +380,7 @@ void PopoverWidget::show_popover(const int rx, const int ry, const mforms::Start
if (_style == mforms::PopoverStyleTooltip)
{
Glib::RefPtr<Gdk::Window> wnd = this->get_window();
- if (wnd != 0)
+ if (wnd)
{
int xx;
int yy;
@@ -396,7 +396,7 @@ void PopoverWidget::show_popover(const int rx, const int ry, const mforms::Start
{
Gdk::ModifierType mask;
Glib::RefPtr<Gdk::Display> dsp = Gdk::Display::get_default();
- if (dsp != 0)
+ if (dsp)
dsp->get_pointer(x, y, mask);
}
diff --git a/library/forms/gtk/src/lf_popup.cpp b/library/forms/gtk/src/lf_popup.cpp
index 289c511..5de3b49 100644
--- a/library/forms/gtk/src/lf_popup.cpp
+++ b/library/forms/gtk/src/lf_popup.cpp
@@ -81,7 +81,8 @@ void PopupImpl::on_screen_changed(const Glib::RefPtr<Gdk::Screen>& screen)
{
d("\n");
Glib::RefPtr<Gdk::Colormap> colormap = screen->get_rgba_colormap();
- _have_rgba = colormap;
+ if (colormap)
+ _have_rgba = true;
if (!_have_rgba)
colormap = screen->get_rgb_colormap();
--
2.10.0