Skip to content
Browse files

Fix FTBFS on gcc-4.7

Thanks to kibi@ for his patch!

Signed-off-by: Zak B. Elep <zakame@zakame.net>
  • Loading branch information...
1 parent c41911f commit fb44833fa9a68144968fd061705294eb26edd5b1 @zakame committed Apr 9, 2012
Showing with 54 additions and 1 deletion.
  1. +2 −1 debian/changelog
  2. +51 −0 debian/patches/fix-ftbfs-with-gcc-4.7
  3. +1 −0 debian/patches/series
View
3 debian/changelog
@@ -10,8 +10,9 @@ xshisen (1:1.51-4) unstable; urgency=low
* Use dh instead of cdbs
* Fix version number in X resources (now says 1.51 instead of 1.50)
* Add Vcs-* fields
+ * Add patch by kibi@ to fix FTBFS on gcc-4.7 (Closes: #667425)
- -- Zak B. Elep <zakame@zakame.net> Mon, 09 Apr 2012 16:21:09 +0800
+ -- Zak B. Elep <zakame@zakame.net> Mon, 09 Apr 2012 16:40:47 +0800
xshisen (1:1.51-3.2) unstable; urgency=low
View
51 debian/patches/fix-ftbfs-with-gcc-4.7
@@ -0,0 +1,51 @@
+From: Cyril Brulebois <kibi@debian.org>
+Subject: Fix FTBFS with gcc 4.7 by using “this->foo” where needed (Closes: #667425).
+Date: Wed, 4 Apr 2012 16:08:57 +0200
+
+Bug-Debian: http://bugs.debian.org/667425
+---
+ body.C | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+--- a/body.C
++++ b/body.C
+@@ -40,13 +40,13 @@ Body::Body(int g, int x, int y, Widget p
+ {
+ int i, num_each;
+
+- pie = new (Mahjong** [xsize]);
+- initialp = new (Mahjong** [xsize]);
+- pstatus = new (unsigned char* [xsize]);
++ pie = new (Mahjong** [this->xsize]);
++ initialp = new (Mahjong** [this->xsize]);
++ pstatus = new (unsigned char* [this->xsize]);
+ for(i=0; i<xsize; i++) {
+- pie[i] = new (Mahjong* [ysize]);
+- initialp[i] = new (Mahjong* [ysize]);
+- pstatus[i] = new unsigned char [ysize];
++ pie[i] = new (Mahjong* [this->ysize]);
++ initialp[i] = new (Mahjong* [this->ysize]);
++ pstatus[i] = new unsigned char [this->ysize];
+ }
+ num_each = x*y/PKIND;
+ for(i=0; i<PKIND; i++) {
+@@ -146,13 +146,13 @@ Body::ChangeGame(int g, int x, int y)
+ delete[] initialp;
+ delete[] pstatus;
+
+- pie = new (Mahjong** [xsize]);
+- initialp = new (Mahjong** [xsize]);
+- pstatus = new (unsigned char* [xsize]);
++ pie = new (Mahjong** [this->xsize]);
++ initialp = new (Mahjong** [this->xsize]);
++ pstatus = new (unsigned char* [this->xsize]);
+ for(i=0; i<xsize; i++) {
+- pie[i] = new (Mahjong* [ysize]);
+- initialp[i] = new (Mahjong* [ysize]);
+- pstatus[i] = new unsigned char [ysize];
++ pie[i] = new (Mahjong* [this->ysize]);
++ initialp[i] = new (Mahjong* [this->ysize]);
++ pstatus[i] = new unsigned char [this->ysize];
+ }
+ num_each = x*y/PKIND;
+ for(i=0; i<PKIND; i++) {
View
1 debian/patches/series
@@ -5,3 +5,4 @@
0005-patch-numerous-security-holes-in-xshisen.patch
0006-Fix-format-string-use.patch
0007-Fix-version-number-in-resources.patch
+fix-ftbfs-with-gcc-4.7

0 comments on commit fb44833

Please sign in to comment.
Something went wrong with that request. Please try again.