Skip to content

Commit

Permalink
#611:Eliminate variable shadowing in local.c
Browse files Browse the repository at this point in the history
Resolves build problems when compiling with -Werror=shadow.

Signed-off-by: Marc Sporcich <[email protected]>
  • Loading branch information
Marc Sporcich authored and commodo committed Oct 21, 2020
1 parent 5e935b5 commit 04d52b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions local.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,6 @@ static int local_close(const struct iio_device *dev)
ret = 0;
ret1 = 0;
if (pdata->is_high_speed) {
unsigned int i;
if (pdata->addrs) {
for (i = 0; i < pdata->allocated_nb_blocks; i++)
munmap(pdata->addrs[i], pdata->blocks[i].size);
Expand Down Expand Up @@ -1198,7 +1197,7 @@ static char * get_short_attr_name(struct iio_channel *chn, const char *attr)
ptr += len + 1;

if (chn->name) {
size_t len = strlen(chn->name);
len = strlen(chn->name);
if (strncmp(chn->name, ptr, len) == 0 && ptr[len] == '_')
ptr += len + 1;
}
Expand Down

0 comments on commit 04d52b2

Please sign in to comment.