Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/citrus Add some casts to quiet a "discards qualifie...
details: https://anonhg.NetBSD.org/src/rev/fe29827e3202
branches: trunk
changeset: 531724:fe29827e3202
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri May 24 04:04:30 2002 +0000
description:
Add some casts to quiet a "discards qualifier from pointer target type"
warning from gcc 3.2 (experimental) (which is complaining about the loss
of __restrict).
Reviewed and approved by tshiozak%astec.co.jp@localhost.
diffstat:
lib/libc/citrus/citrus_ctype_template.h | 12 ++++++------
lib/libc/citrus/citrus_none.c | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (90 lines):
diff -r 85ff2dfdb433 -r fe29827e3202 lib/libc/citrus/citrus_ctype_template.h
--- a/lib/libc/citrus/citrus_ctype_template.h Fri May 24 04:02:47 2002 +0000
+++ b/lib/libc/citrus/citrus_ctype_template.h Fri May 24 04:04:30 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_ctype_template.h,v 1.13 2002/03/28 10:53:48 yamt Exp $ */
+/* $NetBSD: citrus_ctype_template.h,v 1.14 2002/05/24 04:04:30 thorpej Exp $ */
/*-
* Copyright (c)2002 Citrus Project,
@@ -202,7 +202,7 @@
}
state = *psenc;
- err = _FUNCNAME(mbrtowc_priv)(ei, pwc, &s, n, psenc, &nr);
+ err = _FUNCNAME(mbrtowc_priv)(ei, pwc, (const char **)&s, n, psenc, &nr);
if (err) {
*nresult = -1;
return (err);
@@ -445,7 +445,7 @@
*nresult = 0;
} else {
err = _FUNCNAME(mbrtowc_priv)(
- cl, NULL, &s, n, (void *)psenc, nresult);
+ cl, NULL, (const char **)&s, n, (void *)psenc, nresult);
}
_RESTART_END(mbrlen, _TO_CEI(cl), pspriv, psenc);
@@ -468,7 +468,7 @@
*nresult = 0;
} else {
err = _FUNCNAME(mbrtowc_priv)(
- cl, pwc, &s, n, (void *)psenc, nresult);
+ cl, pwc, (const char **)&s, n, (void *)psenc, nresult);
}
_RESTART_END(mbrtowc, _TO_CEI(cl), pspriv, psenc);
@@ -523,7 +523,7 @@
_DIAGASSERT(cl != NULL);
_FUNCNAME(init_state)(_CEI_TO_EI(_TO_CEI(cl)), &state);
- err = _FUNCNAME(mbsrtowcs_priv)(cl, pwcs, &s, n, &state, nresult);
+ err = _FUNCNAME(mbsrtowcs_priv)(cl, pwcs, (const char **)&s, n, &state, nresult);
if (*nresult == (size_t)-2) {
err = EILSEQ;
*nresult = (size_t)-1;
@@ -594,7 +594,7 @@
_DIAGASSERT(cl != NULL);
_FUNCNAME(init_state)(_CEI_TO_EI(_TO_CEI(cl)), &state);
- err = _FUNCNAME(wcsrtombs_priv)(cl, s, &pwcs, n,
+ err = _FUNCNAME(wcsrtombs_priv)(cl, s, (const wchar_t **)&pwcs, n,
&state, nresult);
return err;
diff -r 85ff2dfdb433 -r fe29827e3202 lib/libc/citrus/citrus_none.c
--- a/lib/libc/citrus/citrus_none.c Fri May 24 04:02:47 2002 +0000
+++ b/lib/libc/citrus/citrus_none.c Fri May 24 04:04:30 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_none.c,v 1.4 2002/03/25 20:47:02 yamt Exp $ */
+/* $NetBSD: citrus_none.c,v 1.5 2002/05/24 04:04:30 thorpej Exp $ */
/*-
* Copyright (c)2002 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_none.c,v 1.4 2002/03/25 20:47:02 yamt Exp $");
+__RCSID("$NetBSD: citrus_none.c,v 1.5 2002/05/24 04:04:30 thorpej Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -178,7 +178,7 @@
const char * __restrict s, size_t n,
size_t * __restrict nresult)
{
- return (_citrus_NONE_ctype_mbsrtowcs(cl, wcs, &s, n, NULL, nresult));
+ return (_citrus_NONE_ctype_mbsrtowcs(cl, wcs, (const char **)&s, n, NULL, nresult));
}
static int
@@ -273,7 +273,7 @@
const wchar_t * __restrict pwcs, size_t n,
size_t * __restrict nresult)
{
- return (_citrus_NONE_ctype_wcsrtombs(cl, s, &pwcs, n, NULL, nresult));
+ return (_citrus_NONE_ctype_wcsrtombs(cl, s, (const wchar_t **)&pwcs, n, NULL, nresult));
}
static int
Home |
Main Index |
Thread Index |
Old Index