[devel] [PATCH for apt v2 11/21] Remove useless variable shadowing

Aleksei Nikiforov darktemplar на altlinux.org
Чт Дек 12 12:57:20 MSK 2019


Found via cppcheck:
[apt/cmdline/apt-cdrom.cc:66] -> [apt/cmdline/apt-cdrom.cc:149]:
(style) Local variable 'Buf' shadows outer variable
---
 apt/cmdline/apt-cdrom.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/apt/cmdline/apt-cdrom.cc b/apt/cmdline/apt-cdrom.cc
index eded525..93ad41d 100644
--- a/apt/cmdline/apt-cdrom.cc
+++ b/apt/cmdline/apt-cdrom.cc
@@ -146,7 +146,6 @@ bool FindPackages(string CD,vector<string> &List,vector<string> &SList,
 #endif
 
       // See if the name is a sub directory
-      struct stat Buf;
       if (stat(Dir->d_name,&Buf) != 0)
 	 continue;      
       
-- 
2.24.1



Подробная информация о списке рассылки Devel