winedump: Cast-qual warnings fix (1 of 2)

Andrew Talbot Andrew.Talbot at talbotville.com
Fri Oct 13 11:01:22 CDT 2006


I was helped by the opportunity to remove a redundant assignment.

-- Andy.
---
Changelog:
    winedump: Cast-qual warnings fix (1 of 2).

diff -urN a/tools/winedump/search.c b/tools/winedump/search.c
--- a/tools/winedump/search.c	2006-10-10 13:15:32.000000000 +0100
+++ b/tools/winedump/search.c	2006-10-13 16:10:06.000000000 +0100
@@ -242,15 +242,13 @@
 static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
 {
   int is_const, is_volatile, is_struct, is_signed, is_unsigned, ptrs = 0;
-  const char *iter, *type_str, *base_type, *catch_unsigned;
-  char dest_type;
+  const char *iter, *base_type, *catch_unsigned;
+  char *type_str, dest_type;
 
   assert (sym && sym->symbol);
   assert (proto && *proto);
   assert (arg < 0 || (unsigned)arg == sym->argc);
 
-  type_str = proto;
-
   proto = str_match (proto, "const", &is_const);
   proto = str_match (proto, "volatile", &is_volatile);
   proto = str_match (proto, "struct", &is_struct);
@@ -302,7 +300,7 @@
   {
     /* 'unsigned' with no type */
     char *tmp = str_create (2, type_str, " int");
-    free ((char*)type_str);
+    free (type_str);
     type_str = tmp;
   }
   symbol_clean_string (type_str);
@@ -311,7 +309,7 @@
 
   if (arg < 0)
   {
-    sym->return_text = (char*)type_str;
+    sym->return_text = type_str;
     sym->return_type = dest_type;
   }
   else
@@ -326,13 +324,13 @@
       iter = str_find_set (proto, " ,)");
       if (!iter)
       {
-        free ((char*)type_str);
+        free (type_str);
         return NULL;
       }
       sym->arg_name [arg] = str_substring (proto, iter);
       proto = iter;
     }
-    sym->arg_text [arg] = (char*)type_str;
+    sym->arg_text [arg] = type_str;
 
   }
   return proto;



More information about the wine-patches mailing list