diff options
author | Tom Tromey <tom@tromey.com> | 2018-04-22 10:11:32 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-10-04 22:51:48 -0600 |
commit | b8c888478d517a39d8b0104857d573e47620a3d1 (patch) | |
tree | be75f35669f6b19fecf4c74e9a39d8e607d48e8b /gdb/common | |
parent | ef789dc484a35159ad825c98c4a2502f2097aed7 (diff) | |
download | gdb-b8c888478d517a39d8b0104857d573e47620a3d1.zip gdb-b8c888478d517a39d8b0104857d573e47620a3d1.tar.gz gdb-b8c888478d517a39d8b0104857d573e47620a3d1.tar.bz2 |
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".
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/filestuff.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c index fa10165..dfd86f9 100644 --- a/gdb/common/filestuff.c +++ b/gdb/common/filestuff.c @@ -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); |