From 0936dbd270f19d64b80e85df581817e8d5d4ffc8 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 11 Feb 2023 11:19:08 +0100 Subject: [PATCH] cast to intptr_t not size_t --- mingw-w64-libiconv/PKGBUILD | 2 +- mingw-w64-libiconv/fix-pointer-buf.patch | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mingw-w64-libiconv/PKGBUILD b/mingw-w64-libiconv/PKGBUILD index db10066e4a..92a750704d 100644 --- a/mingw-w64-libiconv/PKGBUILD +++ b/mingw-w64-libiconv/PKGBUILD @@ -20,7 +20,7 @@ sha256sums=('8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313' 'SKIP' '2f08ca8681e4c85cdb2e6835921a502fd623dee4bf8ca10aa3c66747ede58a47' '89d5c0f666e50a0186cfb142ba7b77e8fe1ac4d65bdfd9ae14ae8d2f0045a87c' - 'd722fd6851466ed9b81880c1a2cf9b0eaeec34b16dbd8463ff49cd0588ca7fab' + '6b6e2393840f4dc6067587165777b1a07978f4c05247d7c1010a45ad251bbeeb' '56e7ec406bf42eb66b1d972f20d229f7a76ba00c38c7b4403bf348875704baae') validpgpkeys=('9001B85AF9E1B83DF1BDA942F5BE8B267C6A406D') # "Bruno Haible (Open Source Development) " options=('!libtool' 'staticlibs') diff --git a/mingw-w64-libiconv/fix-pointer-buf.patch b/mingw-w64-libiconv/fix-pointer-buf.patch index 06b868c07f..914b87bdf0 100644 --- a/mingw-w64-libiconv/fix-pointer-buf.patch +++ b/mingw-w64-libiconv/fix-pointer-buf.patch @@ -7,7 +7,7 @@ #define stringpool2 ((const char *) &stringpool2_contents) static const struct alias sysdep_aliases[] = { -#define S(tag,name,encoding_index) { (int)(long)&((struct stringpool2_t *)0)->stringpool_##tag, encoding_index }, -+#define S(tag,name,encoding_index) { (intptr_t)&((struct stringpool2_t *)0)->stringpool_##tag, encoding_index }, ++#define S(tag,name,encoding_index) { (int)(intptr_t)&((struct stringpool2_t *)0)->stringpool_##tag, encoding_index }, #include "aliases2.h" #undef S }; @@ -21,7 +21,7 @@ } } - fprintf(out2,"\")' tmp.h | sed -e 's|^.*\\(stringpool_str[0-9]*\\).*$| (int)(long)\\&((struct stringpool_t *)0)->\\1,|'\n"); -+ fprintf(out2,"\")' tmp.h | sed -e 's|^.*\\(stringpool_str[0-9]*\\).*$| (int)(size_t)\\&((struct stringpool_t *)0)->\\1,|'\n"); ++ fprintf(out2,"\")' tmp.h | sed -e 's|^.*\\(stringpool_str[0-9]*\\).*$| (int)(intptr_t)\\&((struct stringpool_t *)0)->\\1,|'\n"); for (; n > 0; names++, n--) emit_alias(out1, *names, c_name); } @@ -31,7 +31,7 @@ static void emit_encoding (FILE* out1, FILE* out2, const char* tag, const char* const* names, size_t n, const char* c_name) { - fprintf(out2," (int)(long)&((struct stringpool2_t *)0)->stringpool_%s_%u,\n",tag,counter); -+ fprintf(out2," (int)(size_t)&((struct stringpool2_t *)0)->stringpool_%s_%u,\n",tag,counter); ++ fprintf(out2," (int)(intptr_t)&((struct stringpool2_t *)0)->stringpool_%s_%u,\n",tag,counter); for (; n > 0; names++, n--) emit_alias(out1, tag, *names, c_name); }