title: Delphi: how to automatically remove unused vars ("Variable 'x' is declared but never used" hint)
body: <p>Is there any tool (preferably freeware) that can analyze Pascal/Delphi syntax and automatically remove unused vars?</p>
  
  <p>In my case, I'm working with a very large Delphi code base, and the compiler hints report over one thousand cases of "Variable 'x' is declared but never used".</p>
  
  <p>I would take hours to remove them by hand, and I might make errors, but the right tool should be able to do that safely and automatically.</p>
  
  <p>I searched online but didn't find one... does anybody here know of such a tool?</p>
  
  <p>Thanks...</p>
  
  <p>Mark Brarford</p>