winedump: sign-compare fixes
Joris Huizer
joris_huizer at yahoo.com
Wed Feb 7 08:11:37 CST 2007
Skipped content of type multipart/alternative-------------- next part --------------
>From 16b36a973f8024b262980f7db9bd9d2366cc4577 Mon Sep 17 00:00:00 2001
From: Joris Huizer <jorishuizer at debian.(none)>
Date: Wed, 7 Feb 2007 15:04:28 +0100
Subject: [PATCH] sign-compare fixes
To: wine-patches <wine-patches at winehq.org>
---
tools/winedump/minidump.c | 2 +-
tools/winedump/msc.c | 32 ++++++++++++++++++--------------
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/tools/winedump/minidump.c b/tools/winedump/minidump.c
index 2c61a7c..f7ddd89 100644
--- a/tools/winedump/minidump.c
+++ b/tools/winedump/minidump.c
@@ -44,7 +44,7 @@ static void dump_mdmp_string(DWORD rva)
printf("<<?>>");
}
-static const MINIDUMP_DIRECTORY* get_mdmp_dir(const MINIDUMP_HEADER* hdr, int str_idx)
+static const MINIDUMP_DIRECTORY* get_mdmp_dir(const MINIDUMP_HEADER* hdr,unsigned long int str_idx)
{
const MINIDUMP_DIRECTORY* dir;
unsigned int i;
diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c
index 91ad8c1..601130e 100644
--- a/tools/winedump/msc.c
+++ b/tools/winedump/msc.c
@@ -662,14 +662,16 @@ static void codeview_dump_one_type(unsig
break;
case LF_ARGLIST_V2:
- printf("\t%x => Arglist V2(#%u):", curr_type, reftype->arglist_v2.num);
- for (i = 0; i < reftype->arglist_v2.num; i++)
{
- printf("\t %x", reftype->arglist_v2.args[i]);
+ unsigned int i;
+ printf("\t%x => Arglist V2(#%u):", curr_type, reftype->arglist_v2.num);
+ for (i = 0; i < reftype->arglist_v2.num; i++)
+ {
+ printf("\t %x", reftype->arglist_v2.args[i]);
+ }
+ printf("\t\n");
+ break;
}
- printf("\t\n");
- break;
-
case LF_PROCEDURE_V1:
/* FIXME: unknown could be the calling convention for the proc */
printf("\t%x => Procedure V1 ret_type:%x call:%x (#%u args_type:%x)\n",
@@ -785,14 +787,16 @@ static void codeview_dump_one_type(unsig
break;
case LF_DERIVED_V2:
- printf("\t%x => Derived V2(#%u):", curr_type, reftype->derived_v2.num);
- for (i = 0; i < reftype->derived_v2.num; i++)
{
- printf(" %x", reftype->derived_v2.drvdcls[i]);
+ unsigned int i;
+ printf("\t%x => Derived V2(#%u):", curr_type, reftype->derived_v2.num);
+ for (i = 0; i < reftype->derived_v2.num; i++)
+ {
+ printf(" %x", reftype->derived_v2.drvdcls[i]);
+ }
+ printf("\n");
+ break;
}
- printf("\n");
- break;
-
default:
printf(">>> Unsupported type-id %x for %x\n", type->generic.id, curr_type);
dump_data((const void*)type, type->generic.len + 2, "");
@@ -818,7 +822,7 @@ int codeview_dump_types_from_block(const
unsigned int curr_type = 0x1000;
const unsigned char*ptr = table;
- while (ptr - (const unsigned char*)table < len)
+ while ((unsigned long)(ptr - (const unsigned char*)table) < len)
{
const union codeview_type* type = (const union codeview_type*)ptr;
@@ -832,7 +836,7 @@ int codeview_dump_types_from_block(const
int codeview_dump_symbols(const void* root, unsigned long size)
{
- int i, length;
+ unsigned long int i, length;
char* curr_func = NULL;
int nest_block = 0;
/*
--
1.4.4
-------------- next part --------------
>From 251e857028d278bf2a7a5436349bb592a0c4fd06 Mon Sep 17 00:00:00 2001
From: Joris Huizer <jorishuizer at debian.(none)>
Date: Wed, 7 Feb 2007 15:09:30 +0100
Subject: [PATCH] sign-compare fix
To: wine-patches <wine-patches at winehq.org>
---
tools/winedump/pdb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/winedump/pdb.c b/tools/winedump/pdb.c
index bd71ede..fa9be8b 100644
--- a/tools/winedump/pdb.c
+++ b/tools/winedump/pdb.c
@@ -295,7 +295,7 @@ static void pdb_dump_symbols(struct pdb_
/* Read per-module symbol / linenumber tables */
file = (const char*)symbols + sizeof(PDB_SYMBOLS);
- while (file - (const char*)symbols < sizeof(PDB_SYMBOLS) + symbols->module_size)
+ while ((unsigned long int)(file - (const char*)symbols) < sizeof(PDB_SYMBOLS) + symbols->module_size)
{
int file_nr, symbol_size, lineno_size;
const char* file_name;
--
1.4.4
More information about the wine-patches
mailing list