[PATCH] winedump: Remove useless casts to self
Michael Stefaniuc
mstefani at winehq.org
Fri Mar 1 14:08:20 CST 2019
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
tools/winedump/debug.c | 4 ++--
tools/winedump/msc.c | 4 ++--
tools/winedump/msmangle.c | 10 +++++-----
tools/winedump/pdb.c | 4 ++--
tools/winedump/search.c | 4 ++--
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/tools/winedump/debug.c b/tools/winedump/debug.c
index 221c079851..7fa5f4ecee 100644
--- a/tools/winedump/debug.c
+++ b/tools/winedump/debug.c
@@ -413,7 +413,7 @@ static void dump_codeview_headers(unsigned long base, unsigned long len)
if (memcmp(signature, "NB10", 4) == 0)
{
const CODEVIEW_PDB_DATA* pdb_data;
- pdb_data = (const void *)cv_base;
+ pdb_data = cv_base;
printf(" Filepos: 0x%08lX\n", pdb_data->filepos);
printf(" TimeStamp: %08X (%s)\n",
@@ -426,7 +426,7 @@ static void dump_codeview_headers(unsigned long base, unsigned long len)
{
const OMFSignatureRSDS* rsds_data;
- rsds_data = (const void *)cv_base;
+ rsds_data = cv_base;
printf(" Guid: %s\n", get_guid_str(&rsds_data->guid));
printf(" Age: %08X\n", rsds_data->age);
printf(" Filename: %s\n", rsds_data->name);
diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c
index 5890b2926b..5f7765f4d3 100644
--- a/tools/winedump/msc.c
+++ b/tools/winedump/msc.c
@@ -91,7 +91,7 @@ static int full_numeric_leaf(struct full_value* fv, const unsigned short int* le
case LF_USHORT:
length += 2;
- fv->v.i = *(const unsigned short*)leaf;
+ fv->v.i = *leaf;
break;
case LF_LONG:
@@ -1490,7 +1490,7 @@ void codeview_dump_linetab2(const char* linetab, DWORD size, const char* strimag
break;
default:
printf("%sblock end %x\n", pfx, lt2->header);
- lt2 = (const struct codeview_linetab2*)((const char*)linetab + size);
+ lt2 = (const struct codeview_linetab2*)(linetab + size);
continue;
}
lt2 = codeview_linetab2_next_block(lt2);
diff --git a/tools/winedump/msmangle.c b/tools/winedump/msmangle.c
index 39e4f3a173..f9fe75b7d5 100644
--- a/tools/winedump/msmangle.c
+++ b/tools/winedump/msmangle.c
@@ -590,7 +590,7 @@ static char *demangle_datatype (char **str, compound_type *ct,
if (!ct->expression)
return NULL;
- return (char *)(*str = iter);
+ return *str = iter;
}
@@ -629,7 +629,7 @@ static char *get_constraints_convention_1 (char **str, compound_type *ct)
char *iter = *str, **retval = str;
if (ct->have_qualifiers)
- return (char *)*str; /* Previously got constraints for this type */
+ return *str; /* Previously got constraints for this type */
if (*iter == '?' || *iter == 'A')
{
@@ -651,7 +651,7 @@ static char *get_constraints_convention_1 (char **str, compound_type *ct)
}
}
- return (char *)(*retval = iter);
+ return *retval = iter;
}
@@ -666,7 +666,7 @@ static char *get_constraints_convention_2 (char **str, compound_type *ct)
/* FIXME: Why do arrays have both convention 1 & 2 constraints? */
if (ct->have_qualifiers && ct->dest_type != 'Q')
- return (char *)*str; /* Previously got constraints for this type */
+ return *str; /* Previously got constraints for this type */
ct->have_qualifiers = TRUE; /* Even if none, we've got all we're getting */
@@ -687,7 +687,7 @@ static char *get_constraints_convention_2 (char **str, compound_type *ct)
break;
}
- return (char *)(*retval = iter);
+ return *retval = iter;
}
diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c
index 6fd70ce9e5..dcfbea85b4 100644
--- a/tools/winedump/pdb.c
+++ b/tools/winedump/pdb.c
@@ -336,7 +336,7 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
for (j = cfile; j < src->nSrcFiles && j < cfile + indx[i]; j++)
{
/* FIXME: in some cases, it's a p_string but WHEN ? */
- if (cstr + offset[j] >= (const char*)start_cstr /* wrap around */ &&
+ if (cstr + offset[j] >= start_cstr /* wrap around */ &&
cstr + offset[j] < (const char*)src + symbols->srcmodule_size)
printf("\t\t\tSource file: %s\n", cstr + offset[j]);
else
@@ -367,7 +367,7 @@ static void pdb_dump_symbols(struct pdb_reader* reader, PDB_STREAM_INDEXES* sidx
"\t\tAge: %08u\n"
"\t\tfile1: %s\n"
"\t\tfile2: %s\n",
- (ULONG_PTR)((const char*)imp - (const char*)first),
+ (ULONG_PTR)((const char*)imp - first),
imp->unknown1,
imp->unknown2,
imp->TimeDateStamp,
diff --git a/tools/winedump/search.c b/tools/winedump/search.c
index 08aa8e125d..49f83ca70f 100644
--- a/tools/winedump/search.c
+++ b/tools/winedump/search.c
@@ -311,7 +311,7 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
if (arg < 0)
{
- sym->return_text = (char*)type_str;
+ sym->return_text = type_str;
sym->return_type = dest_type;
}
else
@@ -332,7 +332,7 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
sym->arg_name [arg] = str_substring (proto_str, iter);
proto_str = iter;
}
- sym->arg_text [arg] = (char*)type_str;
+ sym->arg_text [arg] = type_str;
}
return proto_str;
--
2.20.1
More information about the wine-devel
mailing list