git: 88a9b6e1ed82 - main - libc: Don't assume signed char.

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Mon, 11 Sep 2023 13:18:34 UTC
The branch main has been updated by des:

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

commit 88a9b6e1ed82b562f52bae26b3de257495cd1983
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-11 13:18:25 +0000

    libc: Don't assume signed char.
    
    MFC after:      3 days
    Reviewed by:    andrew
    Differential Revision:  https://reviews.freebsd.org/D41814
---
 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);