git: c1335a776b0f - stable/14 - libc: Don't assume signed char.

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Thu, 14 Sep 2023 08:57:08 UTC
The branch stable/14 has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=c1335a776b0ff33a715bdaa2be59412006cb4053

commit c1335a776b0ff33a715bdaa2be59412006cb4053
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2023-09-11 13:18:18 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2023-09-14 08:56:45 +0000

    libc: Don't assume signed char.
    
    MFC after:      3 days
    Reviewed by:    andrew
    Differential Revision:  https://reviews.freebsd.org/D41814
    
    (cherry picked from commit 88a9b6e1ed82b562f52bae26b3de257495cd1983)
---
 lib/libc/tests/stdio/snprintf_test.c | 4 ++--
 lib/libc/tests/stdio/swprintf_test.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/libc/tests/stdio/snprintf_test.c b/lib/libc/tests/stdio/snprintf_test.c
index 323356b37a7d..29b908b65120 100644
--- a/lib/libc/tests/stdio/snprintf_test.c
+++ b/lib/libc/tests/stdio/snprintf_test.c
@@ -131,8 +131,8 @@ ATF_TC_WITHOUT_HEAD(snprintf_wN);
 ATF_TC_BODY(snprintf_wN, tc)
 {
 	SNPRINTF_TEST("0", "%w8d", (int8_t)0);
-	SNPRINTF_TEST("-128", "%w8d", (int8_t)CHAR_MIN);
-	SNPRINTF_TEST("127", "%w8d", (int8_t)CHAR_MAX);
+	SNPRINTF_TEST("-128", "%w8d", (int8_t)SCHAR_MIN);
+	SNPRINTF_TEST("127", "%w8d", (int8_t)SCHAR_MAX);
 	SNPRINTF_TEST("0", "%w8u", (uint8_t)0);
 	SNPRINTF_TEST("255", "%w8u", (uint8_t)UCHAR_MAX);
 
diff --git a/lib/libc/tests/stdio/swprintf_test.c b/lib/libc/tests/stdio/swprintf_test.c
index f5dde349412b..f00ecc7f1c1d 100644
--- a/lib/libc/tests/stdio/swprintf_test.c
+++ b/lib/libc/tests/stdio/swprintf_test.c
@@ -132,8 +132,8 @@ ATF_TC_WITHOUT_HEAD(swprintf_wN);
 ATF_TC_BODY(swprintf_wN, tc)
 {
 	SWPRINTF_TEST("0", "%w8d", (int8_t)0);
-	SWPRINTF_TEST("-128", "%w8d", (int8_t)CHAR_MIN);
-	SWPRINTF_TEST("127", "%w8d", (int8_t)CHAR_MAX);
+	SWPRINTF_TEST("-128", "%w8d", (int8_t)SCHAR_MIN);
+	SWPRINTF_TEST("127", "%w8d", (int8_t)SCHAR_MAX);
 	SWPRINTF_TEST("0", "%w8u", (uint8_t)0);
 	SWPRINTF_TEST("255", "%w8u", (uint8_t)UCHAR_MAX);