Module Name:    src
Committed By:   riastradh
Date:           Fri Jun  7 13:53:12 UTC 2024

Modified Files:
        src/lib/libc/citrus: citrus_fix_grouping.h
        src/lib/libc/locale: fix_grouping.c global_locale.c

Log Message:
libc/locale: Nix needless char casts.

These appear to have been added to pacify a spurious warning by lint,
which no longer warns about it anyway.

No functional change intended.  No binary change to aarch64 libc.

Prompted by code inspection around PR lib/58319.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/citrus/citrus_fix_grouping.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/locale/fix_grouping.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/locale/global_locale.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/citrus/citrus_fix_grouping.h
diff -u src/lib/libc/citrus/citrus_fix_grouping.h:1.2 src/lib/libc/citrus/citrus_fix_grouping.h:1.3
--- src/lib/libc/citrus/citrus_fix_grouping.h:1.2	Sun Jan 11 02:46:24 2009
+++ src/lib/libc/citrus/citrus_fix_grouping.h	Fri Jun  7 13:53:12 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_fix_grouping.h,v 1.2 2009/01/11 02:46:24 christos Exp $ */
+/* $NetBSD: citrus_fix_grouping.h,v 1.3 2024/06/07 13:53:12 riastradh Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -43,7 +43,7 @@ _citrus_fixup_char_max_md(char *grouping
 
 	for (p = grouping; *p != '\0'; ++p) {
 		if (*p == _CITRUS_LC_GROUPING_VALUE_NO_FUTHER)
-			*p = (char)CHAR_MAX;
+			*p = CHAR_MAX;
 	}
 }
 #define _CITRUS_FIXUP_CHAR_MAX_MD(grouping) \

Index: src/lib/libc/locale/fix_grouping.c
diff -u src/lib/libc/locale/fix_grouping.c:1.6 src/lib/libc/locale/fix_grouping.c:1.7
--- src/lib/libc/locale/fix_grouping.c:1.6	Wed Mar 21 14:11:24 2012
+++ src/lib/libc/locale/fix_grouping.c	Fri Jun  7 13:53:12 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: fix_grouping.c,v 1.6 2012/03/21 14:11:24 christos Exp $ */
+/* $NetBSD: fix_grouping.c,v 1.7 2024/06/07 13:53:12 riastradh Exp $ */
 
 /*
  * Copyright (c) 2001 Alexey Zelkin <phan...@freebsd.org>
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fix_grouping.c,v 1.6 2012/03/21 14:11:24 christos Exp $");
+__RCSID("$NetBSD: fix_grouping.c,v 1.7 2024/06/07 13:53:12 riastradh Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <limits.h>
@@ -44,7 +44,7 @@ __RCSID("$NetBSD: fix_grouping.c,v 1.6 2
 #include "fix_grouping.h"
 
 #ifndef NBCHAR_MAX
-#define NBCHAR_MAX	(char)CHAR_MAX
+#define NBCHAR_MAX	CHAR_MAX
 #endif
 
 #ifndef __UNCONST

Index: src/lib/libc/locale/global_locale.c
diff -u src/lib/libc/locale/global_locale.c:1.26 src/lib/libc/locale/global_locale.c:1.27
--- src/lib/libc/locale/global_locale.c:1.26	Fri Jun  7 13:53:02 2024
+++ src/lib/libc/locale/global_locale.c	Fri Jun  7 13:53:12 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: global_locale.c,v 1.26 2024/06/07 13:53:02 riastradh Exp $ */
+/* $NetBSD: global_locale.c,v 1.27 2024/06/07 13:53:12 riastradh Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: global_locale.c,v 1.26 2024/06/07 13:53:02 riastradh Exp $");
+__RCSID("$NetBSD: global_locale.c,v 1.27 2024/06/07 13:53:12 riastradh Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -58,20 +58,20 @@ static const _MonetaryLocale _DefaultMon
 	"",
 	"",
 	"",
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX,
-	(char)CHAR_MAX
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX,
+	CHAR_MAX
 };
 
 static const _NumericLocale _DefaultNumericLocale = {

Reply via email to