diff options
author | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2018-01-07 21:53:15 +0000 |
---|---|---|
committer | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2018-01-07 21:53:15 +0000 |
commit | e2979955fd36b9e11c93dd5607d51ede0ed25c3f (patch) | |
tree | b2e3cdf770ce57063de12f04a954de6ef7a414d6 /x11-toolkits/qt4-gui | |
parent | Set LLD_UNSAFE=yes that the port will continue to link with ld.bfd (diff) |
Fix the build on i386 with clang 6.0.
kernel/qx11embed_x11.cpp:486:20: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'long' in initializer list [-Wc++11-narrowing]
long data[] = {XEMBED_VERSION, XEMBED_MAPPED};
^~~~~~~~~~~~~~
kernel/qx11embed_x11.cpp:486:20: note: insert an explicit cast to silence this issue
long data[] = {XEMBED_VERSION, XEMBED_MAPPED};
^~~~~~~~~~~~~~
static_cast<long>( )
PR: 224945
Notes
Notes:
svn path=/head/; revision=458386
Diffstat (limited to 'x11-toolkits/qt4-gui')
-rw-r--r-- | x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp b/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp new file mode 100644 index 000000000000..e73b787a4519 --- /dev/null +++ b/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp @@ -0,0 +1,48 @@ +Fixes the build on i386 with clang 6.0: + +kernel/qx11embed_x11.cpp:486:20: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'long' in initializer list [-Wc++11-narrowing] + long data[] = {XEMBED_VERSION, XEMBED_MAPPED}; + ^~~~~~~~~~~~~~ +kernel/qx11embed_x11.cpp:486:20: note: insert an explicit cast to silence this issue + long data[] = {XEMBED_VERSION, XEMBED_MAPPED}; + ^~~~~~~~~~~~~~ + static_cast<long>( ) + +--- src/gui/kernel/qx11embed_x11.cpp.orig 2018-01-07 21:44:01 UTC ++++ src/gui/kernel/qx11embed_x11.cpp +@@ -275,7 +275,7 @@ class QHackWidget : public QWidget (public) + QTLWExtra* topData() { return d_func()->topData(); } + }; + +-static unsigned int XEMBED_VERSION = 0; ++static quint32 XEMBED_VERSION = 0; + + enum QX11EmbedMessageType { + XEMBED_EMBEDDED_NOTIFY = 0, +@@ -483,7 +483,7 @@ QX11EmbedWidget::QX11EmbedWidget(QWidget *parent) + | ExposureMask | StructureNotifyMask + | SubstructureNotifyMask | PropertyChangeMask); + +- long data[] = {XEMBED_VERSION, XEMBED_MAPPED}; ++ quint32 data[] = {XEMBED_VERSION, XEMBED_MAPPED}; + XChangeProperty(x11Info().display(), internalWinId(), ATOM(_XEMBED_INFO), + ATOM(_XEMBED_INFO), 32, PropModeReplace, + (unsigned char*) data, 2); +@@ -1578,7 +1578,7 @@ void QX11EmbedContainer::showEvent(QShowEvent *) + { + Q_D(QX11EmbedContainer); + if (d->client) { +- long data[] = {XEMBED_VERSION, XEMBED_MAPPED}; ++ quint32 data[] = {XEMBED_VERSION, XEMBED_MAPPED}; + XChangeProperty(x11Info().display(), d->client, ATOM(_XEMBED_INFO), ATOM(_XEMBED_INFO), 32, + PropModeReplace, (unsigned char *) data, 2); + } +@@ -1594,7 +1594,7 @@ void QX11EmbedContainer::hideEvent(QHideEvent *) + { + Q_D(QX11EmbedContainer); + if (d->client) { +- long data[] = {XEMBED_VERSION, XEMBED_MAPPED}; ++ quint32 data[] = {XEMBED_VERSION, XEMBED_MAPPED}; + XChangeProperty(x11Info().display(), d->client, ATOM(_XEMBED_INFO), ATOM(_XEMBED_INFO), 32, + PropModeReplace, (unsigned char *) data, 2); + } |