Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2018 10:29:43 +0800
From:      Erich Dollansky <freebsd.ed.lists@sumeritec.com>
To:        "ports@freebsd.org" <ports@freebsd.org>
Cc:        A.J.Caines@halplant.com
Subject:   Blackbox does not compile, diff in here
Message-ID:  <20180809102943.3ab85fce.freebsd.ed.lists@sumeritec.com>

next in thread | raw e-mail | index | archive | help
Hi,

I do not know if somebody spotted this already. Some casting was done
to the wrong types.

Erich

PS I am not experienced in creating diffs for ports. This one was done
in the working directory's lib entry: 


--- EWMH.cc.180809      2005-01-24
15:50:56.000000000 +0800 +++ EWMH.cc     2018-08-09 10:10:05.630203000
+0800 @@ -204,7 +204,7 @@
 bool bt::EWMH::readNumberOfDesktops(Window target,
                                      unsigned int* number) const {
   unsigned char* data = 0;
-  if (getProperty(target, XA_CARDINAL, net_number_of_desktops, &data))
{
+  if (getProperty (target, XA_CARDINAL, net_number_of_desktops,
&data)) { *number =
       static_cast<unsigned int>(*(reinterpret_cast<unsigned long
*>(data))); 
@@ -246,8 +246,11 @@
 
 
 void bt::EWMH::setDesktopViewport(Window target, int x, int y) const {
+       //
+       // 09.08.18 ed: the following statement was modified.
+       //
   const unsigned long viewport[] =
-    { static_cast<long>(x), static_cast<long>(y) };
+    { static_cast<unsigned long>(x), static_cast<unsigned long>(y) };
   setProperty(target, XA_CARDINAL, net_desktop_viewport,
               reinterpret_cast<const unsigned char *>(viewport), 2);
 }
@@ -644,8 +647,10 @@
 }
 
 
-bool bt::EWMH::getProperty(Window target, Atom type, Atom property,
-                            unsigned char** data) const {
+bool bt::EWMH::getProperty (Window                             target,
+
Atom                                   type,
+
Atom                                   property,
+                            unsigned char              ** data) const {
   Atom atom_return;
   int size;
   unsigned long nitems, bytes_left;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180809102943.3ab85fce.freebsd.ed.lists>