Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jan 2018 21:53:15 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458386 - head/x11-toolkits/qt4-gui/files
Message-ID:  <201801072153.w07LrFbr081938@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Sun Jan  7 21:53:15 2018
New Revision: 458386
URL: https://svnweb.freebsd.org/changeset/ports/458386

Log:
  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

Added:
  head/x11-toolkits/qt4-gui/files/
  head/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp   (contents, props changed)

Added: head/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-toolkits/qt4-gui/files/patch-src_gui_kernel_qx11embed__x11.cpp	Sun Jan  7 21:53:15 2018	(r458386)
@@ -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);
+     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801072153.w07LrFbr081938>