mirror of
https://codeberg.org/flk/meta-wayland.git
synced 2024-12-26 05:28:23 +01:00
xcur2png: ignore implicit-int
- add a patch to fix math
This commit is contained in:
parent
bb04c59a12
commit
f86c867611
27
recipes-extended/xcur2png/xcur2png/0001-fix-wrong-math.patch
Normal file
27
recipes-extended/xcur2png/xcur2png/0001-fix-wrong-math.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From cda8f7af382f5c5f1e9a395eb03e2b819770d499 Mon Sep 17 00:00:00 2001
|
||||
From: Yuji Saeki <44311901+YujiSaeki@users.noreply.github.com>
|
||||
Date: Mon, 1 Jun 2020 22:32:16 +0200
|
||||
Subject: [PATCH 1/1] fix wrong math
|
||||
|
||||
Signed-off-by: Christian Hesse <mail@eworm.de>
|
||||
---
|
||||
xcur2png.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/xcur2png.c b/xcur2png.c
|
||||
index 8723a10..f7dd95d 100644
|
||||
--- a/xcur2png.c
|
||||
+++ b/xcur2png.c
|
||||
@@ -586,9 +586,9 @@ int writePngFileFromXcur (const XcursorDim width, const XcursorDim height,
|
||||
unsigned int red = (pixels[i]>>16) & 0xff;
|
||||
unsigned int green = (pixels[i]>>8) & 0xff;
|
||||
unsigned int blue = pixels[i] & 0xff;
|
||||
- red = (div (red * 256, alpha).quot) & 0xff;
|
||||
- green = (div (green * 256, alpha).quot) & 0xff;
|
||||
- blue = (div (blue * 256, alpha).quot) & 0xff;
|
||||
+ red = (div (red * 255, alpha).quot) & 0xff;
|
||||
+ green = (div (green * 255, alpha).quot) & 0xff;
|
||||
+ blue = (div (blue * 255, alpha).quot) & 0xff;
|
||||
pix[i] = (alpha << 24) + (red << 16) + (green << 8) + blue;
|
||||
}
|
||||
|
@ -5,11 +5,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
|
||||
DEPENDS = "libxcursor libpng"
|
||||
|
||||
SRC_URI = " \
|
||||
git://github.com/eworm-de/xcur2png.git;protocol=https;branch=master \
|
||||
file://0001-fix-wrong-math.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
SRCREV = "f582d648f37a9ed2de0c8650947487af8a54d3ad"
|
||||
PV = "0.7.1"
|
||||
|
||||
SRC_URI = "git://github.com/eworm-de/xcur2png.git;protocol=https;branch=master"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
CFLAGS += "-Wno-implicit-int"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user