forked from Imagelibrary/binutils-gdb
Avoid shadowing in fdwalk
-Wshadow=local caught this buglet. fdwalk redeclares "result" in the inner scope, meaning that this function will always return 0, even on error. gdb/ChangeLog 2018-10-04 Tom Tromey <tom@tromey.com> * common/filestuff.c (fdwalk): Remove inner declaration of "result".
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2018-10-04 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* common/filestuff.c (fdwalk): Remove inner declaration of
|
||||
"result".
|
||||
|
||||
2018-10-04 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* msp430-tdep.c (msp430_push_dummy_call): Rename inner
|
||||
|
||||
@@ -80,7 +80,6 @@ fdwalk (int (*func) (void *, int), void *arg)
|
||||
{
|
||||
long fd;
|
||||
char *tail;
|
||||
int result;
|
||||
|
||||
errno = 0;
|
||||
fd = strtol (entry->d_name, &tail, 10);
|
||||
|
||||
Reference in New Issue
Block a user