]> pd.if.org Git - pdclib/commitdiff
Compiler warnings regarding const > non-const assignments. Fixed.
authorMartin Baute <solar@rootdirectory.de>
Tue, 1 Mar 2016 07:56:11 +0000 (08:56 +0100)
committerMartin Baute <solar@rootdirectory.de>
Tue, 1 Mar 2016 07:56:11 +0000 (08:56 +0100)
functions/string/strcoll.c
functions/string/strxfrm.c
opt/basecodecs/_PDCLIB_utf8.c

index b6a4cd6d242aa0e195d93e221816162f4c2d73bb..ebe9a450b5bc887ecab51d32770c80c2899f06bd 100644 (file)
@@ -14,7 +14,7 @@
 
 int strcoll( const char * s1, const char * s2 )
 {
-    _PDCLIB_ctype_t * ctype = _PDCLIB_threadlocale()->_CType;
+    const _PDCLIB_ctype_t * ctype = _PDCLIB_threadlocale()->_CType;
 
     while ( ( *s1 ) && ( ctype[(unsigned char)*s1].collation == ctype[(unsigned char)*s2].collation ) )
     {
index 3ea8d0fab6259c0f8c983eb4548a7d005fe037c9..db3ad48c07d4911357b26c5a0a334be9f47d6775 100644 (file)
@@ -14,7 +14,7 @@
 
 size_t strxfrm( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, size_t n )
 {
-    _PDCLIB_ctype_t *ctype = _PDCLIB_threadlocale()->_CType;
+    const _PDCLIB_ctype_t *ctype = _PDCLIB_threadlocale()->_CType;
     size_t len = strlen( s2 );
     if ( len < n )
     {
index 22fa808c963fa33b4a1bfbd71565bfc141c5bc84..7966d882afb520a9435c816c1c66f5db0b6ce70e 100644 (file)
@@ -254,11 +254,11 @@ int main( void )
 
     char32_t c32out[8];
 
-    char32_t *c32ptr = &c32out[0];
-    size_t    c32rem = 8;
-    char     *chrptr = (char*) &input[0];
-    size_t    chrrem = strlen(input);
-    mbstate_t mbs = { 0 };
+    char32_t   *c32ptr = &c32out[0];
+    size_t      c32rem = 8;
+    const char *chrptr = (char*) &input[0];
+    size_t      chrrem = strlen(input);
+    mbstate_t   mbs = { 0 };
 
     TESTCASE(utf8toc32(&c32ptr, &c32rem, &chrptr, &chrrem, &mbs));
     TESTCASE(c32rem == 0);