riched20: Cast-qual warning fix

Andrew Talbot Andrew.Talbot at talbotville.com
Mon Sep 25 14:02:10 CDT 2006


Changelog:
    riched20: Cast-qual warning fix.

diff -urN a/dlls/riched20/reader.c b/dlls/riched20/reader.c
--- a/dlls/riched20/reader.c	2006-08-11 10:59:24.000000000 +0100
+++ b/dlls/riched20/reader.c	2006-09-25 19:43:10.000000000 +0100
@@ -66,7 +66,7 @@
 static void	ReadObjGroup (RTF_Info *);
 static void	LookupInit (void);
 static void	Lookup (RTF_Info *, char *);
-static int	Hash (char*);
+static int	Hash (const char *);
 
 static void	CharAttr(RTF_Info *info);
 static void	CharSet(RTF_Info *info);
@@ -2349,8 +2349,8 @@
                 memset(rtfHashTable, 0, RTF_KEY_COUNT * 2 * sizeof(*rtfHashTable));
 		for (rp = rtfKey; rp->rtfKStr != NULL; rp++) {
                         int index;
-                        
-			rp->rtfKHash = Hash ((char*)rp->rtfKStr);
+
+			rp->rtfKHash = Hash (rp->rtfKStr);
                         index = rp->rtfKHash % (RTF_KEY_COUNT * 2);
                         if (!rtfHashTable[index].count)
                                 rtfHashTable[index].value = RTFAlloc(sizeof(RTFKey *));
@@ -2398,7 +2398,7 @@
  * Compute hash value of symbol
  */
 
-static int Hash(char *s)
+static int Hash(const char *s)
 {
 	char	c;
 	int	val = 0;



More information about the wine-patches mailing list