aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/lcCT.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-10 22:21:54 -0700
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:28 +0200
commitd8358c6ef0c05dad211ad273dc669fae94884441 (patch)
treef5ac8c794c48782b6712b38c61cfd6ea254a40be /nx-X11/lib/X11/lcCT.c
parente667b9054308dd2033d3771a0656dd485286e855 (diff)
downloadnx-libs-d8358c6ef0c05dad211ad273dc669fae94884441.tar.gz
nx-libs-d8358c6ef0c05dad211ad273dc669fae94884441.tar.bz2
nx-libs-d8358c6ef0c05dad211ad273dc669fae94884441.zip
xlibi18n: Fix a bunch of const cast warnings
Add const qualifiers to casts where needed, remove other casts that are no longer needed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/lcCT.c')
-rw-r--r--nx-X11/lib/X11/lcCT.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nx-X11/lib/X11/lcCT.c b/nx-X11/lib/X11/lcCT.c
index d7fbb74cb..317e3999f 100644
--- a/nx-X11/lib/X11/lcCT.c
+++ b/nx-X11/lib/X11/lcCT.c
@@ -970,7 +970,7 @@ cstoct(
/* The CompoundText specification says that the only
control characters allowed are 0x09, 0x0a, 0x1b, 0x9b.
Therefore here we eliminate other control characters. */
- unsigned char ch = *((unsigned char *) csptr) & 0x7f;
+ unsigned char ch = *((const unsigned char *) csptr) & 0x7f;
if (!((ch >= min_ch && ch <= max_ch)
|| (side == XlcGL
&& (ch == 0x00 || ch == 0x09 || ch == 0x0a))
@@ -1020,7 +1020,7 @@ cstoct(
#endif
) {
while (csstr_len > 0 && ct_len > 0) {
- unsigned char ch = * (unsigned char *) csptr;
+ unsigned char ch = * (const unsigned char *) csptr;
int char_size = (ch < 0xc0 ? 1 :
ch < 0xe0 ? 2 :
ch < 0xf0 ? 3 :
@@ -1093,9 +1093,9 @@ strtocs(
dst = (char *) *to;
length = min(*from_left, *to_left);
- side = *((unsigned char *) src) & 0x80;
+ side = *((const unsigned char *) src) & 0x80;
- while (side == (*((unsigned char *) src) & 0x80) && length-- > 0)
+ while (side == (*((const unsigned char *) src) & 0x80) && length-- > 0)
*dst++ = *src++;
*from_left -= src - (const char *) *from;
@@ -1140,7 +1140,7 @@ cstostr(
str_len = *to_left;
while (csstr_len > 0 && str_len > 0) {
- ch = *((unsigned char *) csptr++);
+ ch = *((const unsigned char *) csptr++);
csstr_len--;
/* Citing ICCCM: "STRING as a type specifies the ISO Latin-1 character
set plus the control characters TAB and NEWLINE." */