Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/wm/herbstluftwm Explicitly narrow initializers.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bf923ca3151b
branches:  trunk
changeset: 431553:bf923ca3151b
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu May 14 18:57:58 2020 +0000

description:
Explicitly narrow initializers.

diffstat:

 wm/herbstluftwm/distinfo                         |   4 ++-
 wm/herbstluftwm/patches/patch-src_decoration.cpp |  34 ++++++++++++++++++++++++
 wm/herbstluftwm/patches/patch-src_utils.cpp      |  21 ++++++++++++++
 3 files changed, 58 insertions(+), 1 deletions(-)

diffs (77 lines):

diff -r 0893c7cb3381 -r bf923ca3151b wm/herbstluftwm/distinfo
--- a/wm/herbstluftwm/distinfo  Thu May 14 18:56:23 2020 +0000
+++ b/wm/herbstluftwm/distinfo  Thu May 14 18:57:58 2020 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.1 2020/01/01 15:24:02 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/05/14 18:57:58 joerg Exp $
 
 SHA1 (herbstluftwm-0.7.2.tar.gz) = b07b623fc675ae578a282ded84f38dfa6cd9436e
 RMD160 (herbstluftwm-0.7.2.tar.gz) = 1a61cafad3af500d51aa7cd39fb5413055e33178
 SHA512 (herbstluftwm-0.7.2.tar.gz) = abb49bbc3de9a0ef619ce7063c1cea0d0d25ab2195c53dc0d33e061ad24060da4bbe9b99b9b9126028cdf68b462d4fcc8d1534431e4892d571ff897a68d2113c
 Size (herbstluftwm-0.7.2.tar.gz) = 245506 bytes
 SHA1 (patch-CMakeLists.txt) = 0e5090670bba37bf8c264af1e02dd33e5b2146b8
+SHA1 (patch-src_decoration.cpp) = 106e4084a21034e2ea6b27b69b817344f5cc948f
+SHA1 (patch-src_utils.cpp) = 7a0b56169de193a8622fae70985a4766698c9f98
diff -r 0893c7cb3381 -r bf923ca3151b wm/herbstluftwm/patches/patch-src_decoration.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/herbstluftwm/patches/patch-src_decoration.cpp  Thu May 14 18:57:58 2020 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_decoration.cpp,v 1.1 2020/05/14 18:57:58 joerg Exp $
+
+--- src/decoration.cpp.orig    2020-05-10 21:59:55.356580498 +0000
++++ src/decoration.cpp
+@@ -526,10 +526,10 @@ void decoration_redraw_pixmap(struct HSC
+     if (iw > 0) {
+         /* fill rectangles because drawing does not work */
+         XRectangle rects[] = {
+-            { inner.x - iw, inner.y - iw, inner.width + 2*iw, iw }, /* top */
+-            { inner.x - iw, inner.y, iw, inner.height },  /* left */
+-            { inner.x + inner.width, inner.y, iw, inner.height }, /* right */
+-            { inner.x - iw, inner.y + inner.height, inner.width + 2*iw, iw }, /* bottom */
++            { (short)(inner.x - iw), (short)(inner.y - iw), (unsigned short)(inner.width + 2*iw), (unsigned short)iw }, /* top */
++            { (short)(inner.x - iw), (short)(inner.y), (unsigned short)iw, (unsigned short)inner.height },  /* left */
++            { (short)(inner.x + inner.width), (short)(inner.y), (unsigned short)iw, (unsigned short)inner.height }, /* right */
++            { (short)(inner.x - iw), (short)(inner.y + inner.height), (unsigned short)(inner.width + 2*iw), (unsigned short)iw }, /* bottom */
+         };
+         XSetForeground(g_display, gc, get_client_color(client, s.inner_color));
+         XFillRectangles(g_display, pix, gc, rects, LENGTH(rects));
+@@ -542,10 +542,10 @@ void decoration_redraw_pixmap(struct HSC
+     if (ow > 0) {
+         ow = MIN(ow, (outer.height+1) / 2);
+         XRectangle rects[] = {
+-            { 0, 0, outer.width, ow }, /* top */
+-            { 0, ow, ow, outer.height - 2*ow }, /* left */
+-            { outer.width-ow, ow, ow, outer.height - 2*ow }, /* right */
+-            { 0, outer.height - ow, outer.width, ow }, /* bottom */
++            { 0, 0, (unsigned short)outer.width, (unsigned short)ow }, /* top */
++            { 0, (short)ow, (unsigned short)ow, (unsigned short)(outer.height - 2*ow) }, /* left */
++            { (short)(outer.width-ow), (short)ow, (unsigned short)ow, (unsigned short)(outer.height - 2*ow) }, /* right */
++            { 0, (short)(outer.height - ow), (unsigned short)outer.width, (unsigned short)ow }, /* bottom */
+         };
+         XSetForeground(g_display, gc, get_client_color(client, s.outer_color));
+         XFillRectangles(g_display, pix, gc, rects, LENGTH(rects));
diff -r 0893c7cb3381 -r bf923ca3151b wm/herbstluftwm/patches/patch-src_utils.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/herbstluftwm/patches/patch-src_utils.cpp       Thu May 14 18:57:58 2020 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_utils.cpp,v 1.1 2020/05/14 18:57:58 joerg Exp $
+
+--- src/utils.cpp.orig 2020-05-10 22:10:06.527093091 +0000
++++ src/utils.cpp
+@@ -382,11 +382,11 @@ void set_window_double_border(Display *d
+ 
+     XRectangle rectangles[] =
+     {
+-        { width, 0, ibw, height + ibw },
+-        { full_width - ibw, 0, ibw, height + ibw },
+-        { 0, height, width + ibw, ibw },
+-        { 0, full_height - ibw, width + ibw, ibw },
+-        { full_width - ibw, full_height - ibw, ibw, ibw }
++        { (short)width, 0, (unsigned short)ibw, (unsigned short)(height + ibw) },
++        { (short)(full_width - ibw), 0, (unsigned short)ibw, (unsigned short)(height + ibw) },
++        { 0, (short)height, (unsigned short)(width + ibw), (unsigned short)ibw },
++        { 0, (short)(full_height - ibw), (unsigned short)(width + ibw), (unsigned short)ibw },
++        { (short)(full_width - ibw), (short)(full_height - ibw), (unsigned short)ibw, (unsigned short)ibw }
+     };
+ 
+     Pixmap pix = XCreatePixmap(dpy, win, full_width, full_height, depth);



Home | Main Index | Thread Index | Old Index