From 14ff96261ce05beb7db8fb50a3d9a24040c49e8f Mon Sep 17 00:00:00 2001 From: "R. Bernstein" Date: Fri, 2 Mar 2012 21:04:00 -0500 Subject: [PATCH] Properly address 'len' MinGW shadow variable warnings in ISO9660. From pbatard branch. --- lib/iso9660/iso9660_fs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/iso9660/iso9660_fs.c b/lib/iso9660/iso9660_fs.c index e918110c..7678c84a 100644 --- a/lib/iso9660/iso9660_fs.c +++ b/lib/iso9660/iso9660_fs.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011 + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Rocky Bernstein Copyright (C) 2001 Herbert Valerio Riedel @@ -1463,14 +1463,15 @@ find_lsn_recurse (void *p_image, iso9660_readdir_t iso9660_readdir, } if (statbuf->lsn == lsn) { - unsigned int len=sizeof(iso9660_stat_t)+strlen(statbuf->filename)+1; - iso9660_stat_t *ret_stat = calloc(1, len); + const unsigned int len2 = + sizeof(iso9660_stat_t)+strlen(statbuf->filename)+1; + iso9660_stat_t *ret_stat = calloc(1, len2); if (!ret_stat) { - cdio_warn("Couldn't calloc(1, %d)", len); + cdio_warn("Couldn't calloc(1, %d)", len2); return NULL; } - memcpy(ret_stat, statbuf, len); + memcpy(ret_stat, statbuf, len2); _cdio_list_free (entlist, true); _cdio_list_free (dirlist, true); return ret_stat;