pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/wm avoid "this == null". some compiler optimization re...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a762411669a0
branches:  trunk
changeset: 325616:a762411669a0
user:      ryo <ryo%pkgsrc.org@localhost>
date:      Thu Nov 22 04:56:03 2018 +0000

description:
avoid "this == null". some compiler optimization removes this comparison.

bump revision

diffstat:

 wm/icewm/Makefile                      |   4 +-
 wm/icewm/distinfo                      |   5 ++-
 wm/icewm/patches/patch-src_wmapp.cc    |  44 ++++++++++++++++++++++++++++-----
 wm/icewm/patches/patch-src_yimage.cc   |  15 +++++++++++
 wm/icewm13/Makefile                    |   4 +-
 wm/icewm13/distinfo                    |   4 ++-
 wm/icewm13/patches/patch-src_wmapp.cc  |  33 +++++++++++++++++++++++++
 wm/icewm13/patches/patch-src_yimage.cc |  13 ++++++++++
 8 files changed, 108 insertions(+), 14 deletions(-)

diffs (196 lines):

diff -r 9577e4349592 -r a762411669a0 wm/icewm/Makefile
--- a/wm/icewm/Makefile Thu Nov 22 03:18:30 2018 +0000
+++ b/wm/icewm/Makefile Thu Nov 22 04:56:03 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.48 2018/03/12 11:17:43 wiz Exp $
+# $NetBSD: Makefile,v 1.49 2018/11/22 04:56:03 ryo Exp $
 
 COMMENT=               Small, fast and light-weight window manager
-PKGREVISION=           1
+PKGREVISION=           2
 
 CONFLICTS+=            icewm-gnome-[0-9]* icewm-imlib-[0-9]*
 
diff -r 9577e4349592 -r a762411669a0 wm/icewm/distinfo
--- a/wm/icewm/distinfo Thu Nov 22 03:18:30 2018 +0000
+++ b/wm/icewm/distinfo Thu Nov 22 04:56:03 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.41 2016/10/01 20:40:06 mrg Exp $
+$NetBSD: distinfo,v 1.42 2018/11/22 04:56:03 ryo Exp $
 
 SHA1 (icewm-1.2.38pre2.tar.gz) = e0fa0ac454c8a7bbe850f114e9a0a82082516da3
 RMD160 (icewm-1.2.38pre2.tar.gz) = e2b3fefdae7e1d368920e84d175058e3fe7c8d93
@@ -10,6 +10,7 @@
 SHA1 (patch-ak) = 8f96d98019071522cd8a9196a029842410e4ede1
 SHA1 (patch-src_apppstatus.cc) = ea685b05bdcc7169b8f830409c4948c7ee9092a3
 SHA1 (patch-src_base.h) = cd869fd68b2d169fcded97662212e7eccee9c83c
-SHA1 (patch-src_wmapp.cc) = ce76173aac533a2555c57555de1335d047c14b10
+SHA1 (patch-src_wmapp.cc) = da5b47a2d646be143cf47bf2afdcea3791e4e3b5
 SHA1 (patch-src_yarray.h) = c1e96402396bf6120a286e01c57b7202b4a3b9fb
+SHA1 (patch-src_yimage.cc) = 907f59a94ffee911259af3d0404ab5c24abaaf76
 SHA1 (patch-src_ypixbuf.cc) = 6ecc2f9b76a2bf0589ae9ea98733f61a49f9afd1
diff -r 9577e4349592 -r a762411669a0 wm/icewm/patches/patch-src_wmapp.cc
--- a/wm/icewm/patches/patch-src_wmapp.cc       Thu Nov 22 03:18:30 2018 +0000
+++ b/wm/icewm/patches/patch-src_wmapp.cc       Thu Nov 22 04:56:03 2018 +0000
@@ -1,10 +1,11 @@
-$NetBSD: patch-src_wmapp.cc,v 1.1 2016/10/01 20:40:06 mrg Exp $
-
-Avoid passing 4-byte aligned data to 8-byte aligned needing functions.
+$NetBSD: patch-src_wmapp.cc,v 1.2 2018/11/22 04:56:03 ryo Exp $
 
---- src/wmapp.cc.orig  2009-11-08 10:59:46.000000000 -0800
-+++ src/wmapp.cc       2016-10-01 13:14:03.000000000 -0700
-@@ -219,6 +219,7 @@
+* Avoid passing 4-byte aligned data to 8-byte aligned needing functions.
+* Avoid calling method with null instance.
+
+--- src/wmapp.cc.orig  2009-11-08 18:59:46.000000000 +0000
++++ src/wmapp.cc
+@@ -219,6 +219,7 @@ static void registerProtocols2(Window xi
  #endif
  
      pid_t pid = getpid();
@@ -12,7 +13,7 @@
      const char wmname[] = "IceWM "VERSION" ("HOSTOS"/"HOSTCPU")";
  
  #ifdef GNOME1_HINTS
-@@ -238,7 +239,7 @@
+@@ -238,7 +239,7 @@ static void registerProtocols2(Window xi
  
      XChangeProperty(xapp->display(), xid,
                      _XA_NET_WM_PID, XA_CARDINAL, 32,
@@ -21,3 +22,32 @@
  
      XChangeProperty(xapp->display(), xid,
                      _XA_NET_WM_NAME, XA_STRING, 8,
+@@ -607,14 +608,21 @@ static void initPixmaps() {
+ 
+         for (int a = 0; a <= 1; a++) {
+             for (int b = 0; b <= 1; b++) {
+-                frameT[a][b]->replicate(true, copyMask);
+-                frameB[a][b]->replicate(true, copyMask);
+-                frameL[a][b]->replicate(false, copyMask);
+-                frameR[a][b]->replicate(false, copyMask);
++                if (frameT[a][b] != null)
++                    frameT[a][b]->replicate(true, copyMask);
++                if (frameB[a][b] != null)
++                    frameB[a][b]->replicate(true, copyMask);
++                if (frameL[a][b] != null)
++                    frameL[a][b]->replicate(false, copyMask);
++                if (frameR[a][b] != null)
++                    frameR[a][b]->replicate(false, copyMask);
+             }
+-            titleS[a]->replicate(true, copyMask);
+-            titleT[a]->replicate(true, copyMask);
+-            titleB[a]->replicate(true, copyMask);
++            if (titleS[a] != null)
++                titleS[a]->replicate(true, copyMask);
++            if (titleT[a] != null)
++                titleT[a]->replicate(true, copyMask);
++            if (titleB[a] != null)
++                titleB[a]->replicate(true, copyMask);
+         }
+ 
+         menuButton[0] = paths.loadPixmap(0, "menuButtonI.xpm");
diff -r 9577e4349592 -r a762411669a0 wm/icewm/patches/patch-src_yimage.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/icewm/patches/patch-src_yimage.cc      Thu Nov 22 04:56:03 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_yimage.cc,v 1.1 2018/11/22 04:56:03 ryo Exp $
+
+* "this" must not be null. comparison with null will be removed by compiler optimization.
+
+--- src/yimage.cc.orig 2009-11-08 18:59:46.000000000 +0000
++++ src/yimage.cc
+@@ -244,7 +244,7 @@ YPixmap::~YPixmap() {
+ }
+ 
+ void YPixmap::replicate(bool horiz, bool copyMask) {
+-    if (this == NULL || pixmap() == None || (fMask == None && copyMask))
++    if (pixmap() == None || (fMask == None && copyMask))
+         return;
+ 
+     int dim(horiz ? width() : height());
diff -r 9577e4349592 -r a762411669a0 wm/icewm13/Makefile
--- a/wm/icewm13/Makefile       Thu Nov 22 03:18:30 2018 +0000
+++ b/wm/icewm13/Makefile       Thu Nov 22 04:56:03 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2018/07/18 00:06:24 joerg Exp $
+# $NetBSD: Makefile,v 1.7 2018/11/22 04:56:03 ryo Exp $
 
 DISTNAME=      icewm-1.3.8
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    wm
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=icewm/}
 
diff -r 9577e4349592 -r a762411669a0 wm/icewm13/distinfo
--- a/wm/icewm13/distinfo       Thu Nov 22 03:18:30 2018 +0000
+++ b/wm/icewm13/distinfo       Thu Nov 22 04:56:03 2018 +0000
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.2 2015/11/02 23:42:52 agc Exp $
+$NetBSD: distinfo,v 1.3 2018/11/22 04:56:03 ryo Exp $
 
 SHA1 (icewm-1.3.8.tar.gz) = dc9155227129be14aced00c24c572356e0fa5cd8
 RMD160 (icewm-1.3.8.tar.gz) = cacf40e529a10ab8eb33961236432efd080e81b6
 SHA512 (icewm-1.3.8.tar.gz) = ce9bf3e736a2f3fad4bbf731647b4e4ad0168cd2c4af66b1c43beef9ceeee39d14909714d2fc73ab13f6c285a74dfe31fffc9677ae8bd2d1077716cd6d6afb72
 Size (icewm-1.3.8.tar.gz) = 905680 bytes
 SHA1 (patch-Makefile.in) = c283daa93d33270cc9a648e083fc75c8a695d59d
+SHA1 (patch-src_wmapp.cc) = a2a7cf6d5b1f12e2e6a832b7cd1e320a7be4f055
 SHA1 (patch-src_wmtaskbar.cc) = 5e536a60b9d0a604369f6cc3010e7f577f103d5d
+SHA1 (patch-src_yimage.cc) = 5d825354579d05844986192dc55b5a27eac4483c
 SHA1 (patch-src_ylocale.cc) = 193d3c8b59175855054d3e825b2da4ea0c968123
diff -r 9577e4349592 -r a762411669a0 wm/icewm13/patches/patch-src_wmapp.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/icewm13/patches/patch-src_wmapp.cc     Thu Nov 22 04:56:03 2018 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_wmapp.cc,v 1.1 2018/11/22 04:56:03 ryo Exp $
+
+--- src/wmapp.cc.orig  2013-11-17 16:54:39.000000000 +0000
++++ src/wmapp.cc
+@@ -621,14 +621,21 @@ static void initPixmaps() {
+ 
+         for (int a = 0; a <= 1; a++) {
+             for (int b = 0; b <= 1; b++) {
+-                frameT[a][b]->replicate(true, copyMask);
+-                frameB[a][b]->replicate(true, copyMask);
+-                frameL[a][b]->replicate(false, copyMask);
+-                frameR[a][b]->replicate(false, copyMask);
++                if (frameT[a][b] != null)
++                    frameT[a][b]->replicate(true, copyMask);
++                if (frameB[a][b] != null)
++                    frameB[a][b]->replicate(true, copyMask);
++                if (frameL[a][b] != null)
++                    frameL[a][b]->replicate(false, copyMask);
++                if (frameR[a][b] != null)
++                    frameR[a][b]->replicate(false, copyMask);
+             }
+-            titleS[a]->replicate(true, copyMask);
+-            titleT[a]->replicate(true, copyMask);
+-            titleB[a]->replicate(true, copyMask);
++            if (titleS[a] != null)
++                titleS[a]->replicate(true, copyMask);
++            if (titleT[a] != null)
++                titleT[a]->replicate(true, copyMask);
++            if (titleB[a] != null)
++                titleB[a]->replicate(true, copyMask);
+         }
+ 
+         menuButton[0] = paths->loadPixmap(0, "menuButtonI.xpm");
diff -r 9577e4349592 -r a762411669a0 wm/icewm13/patches/patch-src_yimage.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/icewm13/patches/patch-src_yimage.cc    Thu Nov 22 04:56:03 2018 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_yimage.cc,v 1.1 2018/11/22 04:56:03 ryo Exp $
+
+--- src/yimage.cc.orig 2013-11-17 16:54:39.000000000 +0000
++++ src/yimage.cc
+@@ -246,7 +246,7 @@ YPixmap::~YPixmap() {
+ }
+ 
+ void YPixmap::replicate(bool horiz, bool copyMask) {
+-    if (this == NULL || pixmap() == None || (fMask == None && copyMask))
++    if (pixmap() == None || (fMask == None && copyMask))
+         return;
+ 
+     int dim(horiz ? width() : height());



Home | Main Index | Thread Index | Old Index