diff options
author | Alexander Miller <alex.miller@gmx.de> | 2024-03-31 04:45:25 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2024-05-09 16:18:22 +0300 |
commit | 3f7db6a36ad6a02fff711cfdeebeffc718d68ab4 (patch) | |
tree | 23eb4c9e6515c346b25f1481a6c57bd7c9a06ce8 /x11-misc | |
parent | x11-misc/rss-glx: Fix strict aliasing issue and type mismatch (diff) | |
download | gentoo-3f7db6a36ad6a02fff711cfdeebeffc718d68ab4.tar.gz gentoo-3f7db6a36ad6a02fff711cfdeebeffc718d68ab4.tar.bz2 gentoo-3f7db6a36ad6a02fff711cfdeebeffc718d68ab4.zip |
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@gmx.de>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r-- | x11-misc/rss-glx/files/rss-glx-0.9.1-macro-if-scope.patch | 29 | ||||
-rw-r--r-- | x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild | 1 |
2 files changed, 30 insertions, 0 deletions
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() { |