public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/
Date: Thu,  9 May 2024 13:18:26 +0000 (UTC)	[thread overview]
Message-ID: <1715260702.3f7db6a36ad6a02fff711cfdeebeffc718d68ab4.juippis@gentoo> (raw)

commit:     3f7db6a36ad6a02fff711cfdeebeffc718d68ab4
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Sun Mar 31 02:45:25 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu May  9 13:18:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f7db6a3

x11-misc/rss-glx: Fix if statements partially guarding multistatement macro

Amazingly, this mess didn't cause serious problems; fixing anyway.

Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/rss-glx-0.9.1-macro-if-scope.patch       | 29 ++++++++++++++++++++++
 x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild           |  1 +
 2 files changed, 30 insertions(+)

diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-macro-if-scope.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-macro-if-scope.patch
new file mode 100644
index 000000000000..5044aae31918
--- /dev/null
+++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-macro-if-scope.patch
@@ -0,0 +1,29 @@
+Fix multistatement macro partially guarded by if
+
+The code still works correctly by chance, but it performs redundant
+calls to BZ2_bzBuffToBuffDecompress() and it's a horrible mess.
+
+--- a/src/matrixview.c
++++ b/src/matrixview.c
+@@ -248,8 +248,9 @@ void loadNextImage ()
+ 		GetExceptionInfo (&exception);
+ #endif
+ 
+-		if (!pics)
++		if (!pics) {
+ 			LOAD_TEXTURE (pics, cpics, cpics_compressedsize, cpics_size)
++		}
+ 
+ 		if ((text_x != 90) || (text_y != 70)) {
+ 			if (!pic)
+@@ -279,8 +280,9 @@ void loadNextImage ()
+ 			DestroyImage (image);
+ 			DestroyImage (scaled_image);
+ 		} else {
+-			if (!pics)
++			if (!pics) {
+ 				LOAD_TEXTURE (pics, cpics, cpics_compressedsize, cpics_size)
++			}
+ 
+ 			pic = (unsigned char *)(pics + ((random () & 15) * (text_x * text_y)));
+ 		}

diff --git a/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild b/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild
index 0bbbaa643911..a38286dc8927 100644
--- a/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild
+++ b/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild
@@ -49,6 +49,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-bashism.patch
 	"${FILESDIR}"/${P}-strict-aliasing.patch
 	"${FILESDIR}"/${P}-variable-mismatch.patch
+	"${FILESDIR}"/${P}-macro-if-scope.patch
 )
 
 src_prepare() {


             reply	other threads:[~2024-05-09 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 13:18 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-09 13:18 [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/ Joonas Niilola
2021-03-26  6:44 Joonas Niilola
2021-03-26  6:44 Joonas Niilola
2021-02-21 16:32 David Seifert
2017-05-25 13:32 Jeroen Roovers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1715260702.3f7db6a36ad6a02fff711cfdeebeffc718d68ab4.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox