From 720039ca6dc35ccdc131f7bf3147d4506c508cc5 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 10 Aug 2026 14:59:16 +0200 Subject: [PATCH] CRT: Avoid implicit char to unsigned char casts in strtoumax Fixes -Wpointer-sign warnings. --- Source/Windows/Common/CRT/Musl/strtoimax.c | 3 +-- Source/Windows/Common/CRT/Musl/strtoumax.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Windows/Common/CRT/Musl/strtoimax.c b/Source/Windows/Common/CRT/Musl/strtoimax.c index 673e90ab7..385816972 100644 --- a/Source/Windows/Common/CRT/Musl/strtoimax.c +++ b/Source/Windows/Common/CRT/Musl/strtoimax.c @@ -6,8 +6,7 @@ #include #include -intmax_t strtoimax(const char* s1, char** p, int base) { - const unsigned char* s = s1; +intmax_t strtoimax(const char* s, char** p, int base) { int sign = 0; uintmax_t x; diff --git a/Source/Windows/Common/CRT/Musl/strtoumax.c b/Source/Windows/Common/CRT/Musl/strtoumax.c index 31d406808..d373a7aab 100644 --- a/Source/Windows/Common/CRT/Musl/strtoumax.c +++ b/Source/Windows/Common/CRT/Musl/strtoumax.c @@ -21,7 +21,7 @@ static const unsigned char digits[] = { }; uintmax_t strtoumax(const char* s1, char** p, int base) { - const unsigned char* s = s1; + const unsigned char* s = (const unsigned char*)s1; size_t x1, z1; uintmax_t x, z = 0; int sign = 0;