msvcrt: Cast-qual warnings fix

Andrew Talbot Andrew.Talbot at talbotville.com
Mon Sep 18 16:18:41 CDT 2006


Changelog:
    msvcrt: Cast-qual warnings fix.

diff -urN a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
--- a/dlls/msvcrt/file.c	2006-08-09 16:38:49.000000000 +0100
+++ b/dlls/msvcrt/file.c	2006-09-18 21:56:32.000000000 +0100
@@ -1980,7 +1980,8 @@
   else
   {
       unsigned int i, j, nr_lf;
-      char *s =(char*)buf, *buf_start=(char*)buf, *p;
+      char *p;
+      const char *s = (const char *)buf, *buf_start = (const char *)buf;
       /* find number of \n ( without preceding \r ) */
       for ( nr_lf=0,i = 0; i <count; i++)
       {
@@ -1994,7 +1995,7 @@
       {
           if ((p = MSVCRT_malloc(count + nr_lf)))
           {
-              for(s=(char*)buf, i=0, j=0; i<count; i++)
+              for (s = (const char *)buf, i = 0, j = 0; i < count; i++)
               {
                   if (s[i]== '\n')
                   {
diff -urN a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c
--- a/dlls/msvcrt/misc.c	2006-06-13 12:00:58.000000000 +0100
+++ b/dlls/msvcrt/misc.c	2006-09-18 21:06:56.000000000 +0100
@@ -82,7 +82,7 @@
     {
       if (cf(match, start) == 0)
         return (void *)start; /* found */
-      start = (char*)start + elem_size;
+      start = (const char *)start + elem_size;
     } while (--size);
   return NULL;
 }



More information about the wine-patches mailing list