=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: dbghelp: Assorted fixes for shadow variables.

Alexandre Julliard julliard at winehq.org
Mon Apr 23 13:41:37 CDT 2012


Module: wine
Branch: master
Commit: 89cb501927833ed57132a4bb5b4eb77cc1b89e15
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=89cb501927833ed57132a4bb5b4eb77cc1b89e15

Author: André Hentschel <nerv at dawncrow.de>
Date:   Thu Apr 19 23:22:33 2012 +0200

dbghelp: Assorted fixes for shadow variables.

---

 dlls/dbghelp/dwarf.c |    4 ++--
 dlls/dbghelp/msc.c   |   11 +++++++----
 dlls/dbghelp/path.c  |    1 -
 dlls/dbghelp/stabs.c |    1 -
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index a7a7001..2ce26fa 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -2188,7 +2188,7 @@ static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t* sections,
     vector_init(&files, sizeof(unsigned), 16);
     while (*traverse.data)
     {
-        unsigned int    dir_index, mod_time, length;
+        unsigned int    dir_index, mod_time;
         const char*     name;
         const char*     dir;
         unsigned*       psrc;
@@ -2199,7 +2199,7 @@ static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t* sections,
         mod_time = dwarf2_leb128_as_unsigned(&traverse);
         length = dwarf2_leb128_as_unsigned(&traverse);
         dir = *(const char**)vector_at(&dirs, dir_index);
-        TRACE("Got file %s/%s (%u,%u)\n", dir, name, mod_time, length);
+        TRACE("Got file %s/%s (%u,%lu)\n", dir, name, mod_time, length);
         psrc = vector_add(&files, &ctx->pool);
         *psrc = source_new(ctx->module, dir, name);
     }
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index 53bf6bf..e32c463 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -1551,7 +1551,6 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root
     int                                 i, length;
     struct symt_block*                  block = NULL;
     struct symt*                        symt;
-    const char*                         name;
     struct symt_compiland*              compiland = NULL;
     struct location                     loc;
 
@@ -1947,9 +1946,13 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root
 	case S_PROCREF_V1:
 	case S_DATAREF_V1:
 	case S_LPROCREF_V1:
-            name = (const char*)sym + length;
-            length += (*name + 1 + 3) & ~3;
-            break;
+            {
+                const char* name;
+
+                name = (const char*)sym + length;
+                length += (*name + 1 + 3) & ~3;
+                break;
+            }
 
         case S_MSTOOL_V3: /* just to silence a few warnings */
         case S_MSTOOLINFO_V3:
diff --git a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c
index f16eb00..5bd260e 100644
--- a/dlls/dbghelp/path.c
+++ b/dlls/dbghelp/path.c
@@ -479,7 +479,6 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user)
         {
             HANDLE  hFile, hMap;
             void*   mapping;
-            DWORD   timestamp;
 
             timestamp = ~mf->dw1;
             size = ~mf->dw2;
diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c
index b4188d1..3546cff 100644
--- a/dlls/dbghelp/stabs.c
+++ b/dlls/dbghelp/stabs.c
@@ -604,7 +604,6 @@ static inline int stabs_pts_read_method_info(struct ParseTypedefData* ptd)
         if (mthd == '*')
         {
             long int            ofs;
-            struct symt*        dt;
 
             PTS_ABORTIF(ptd, stabs_pts_read_number(ptd, &ofs) == -1);
             PTS_ABORTIF(ptd, *ptd->ptr++ != ';');




More information about the wine-cvs mailing list