git: 108e85aa5d5c - releng/14.0 - libc: Don't assume signed char.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 14 Sep 2023 15:00:21 UTC
The branch releng/14.0 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=108e85aa5d5c347db8127fc5f50aa2efd3e266d4
commit 108e85aa5d5c347db8127fc5f50aa2efd3e266d4
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:59:59 +0000
libc: Don't assume signed char.
MFC after: 3 days
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D41814
Approved by: re (delphij)
(cherry picked from commit 88a9b6e1ed82b562f52bae26b3de257495cd1983)
(cherry picked from commit c1335a776b0ff33a715bdaa2be59412006cb4053)
---
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);