[gimp/gimp-2-10] plug-ins: fix another cast warning.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] plug-ins: fix another cast warning.
- Date: Tue, 30 Mar 2021 22:09:27 +0000 (UTC)
commit 08b396503f1dfa61d371b8d626ee812f65738dd4
Author: Jehan <jehan girinstud io>
Date: Mon Sep 23 10:50:33 2019 +0200
plug-ins: fix another cast warning.
Fix again these warnings:
> cast from pointer to integer of different size
(cherry picked from commit 2c6e21b1e79b685153075b442fd697b95c89c9f1)
Note: the absence of this made script-fu crash on Windows 64-bit. See
issue #6664. Why this suddenly appeared and never happened before GIMP
2.10.24 is a big mystery.
plug-ins/script-fu/tinyscheme/scheme.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/script-fu/tinyscheme/scheme.c b/plug-ins/script-fu/tinyscheme/scheme.c
index ccd44759ae..d84f631c0e 100644
--- a/plug-ins/script-fu/tinyscheme/scheme.c
+++ b/plug-ins/script-fu/tinyscheme/scheme.c
@@ -44,6 +44,7 @@
#include <limits.h>
#include <float.h>
#include <ctype.h>
+#include <stdint.h>
#include <string.h>
#include "../script-fu-intl.h"
@@ -629,8 +630,8 @@ static int alloc_cellseg(scheme *sc, int n) {
i = ++sc->last_cell_seg ;
sc->alloc_seg[i] = cp;
/* adjust in TYPE_BITS-bit boundary */
- if(((unsigned long)cp)%adj!=0) {
- cp=(char*)(adj*((unsigned long)cp/adj+1));
+ if(((uintptr_t)cp)%adj!=0) {
+ cp=(char*)(adj*((uintptr_t)cp/adj+1));
}
/* insert new segment in address order */
newp=(pointer)cp;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]