Commit 00cdac438ef4dfeaf0f18b06cfbb81b2d21e661d
Skip main() from the list of unused functions
Initial try checked for main() incorrectly.
Author: xaizek
Author date (UTC): 2016-01-13 18:52
Committer name: xaizek
Committer date (UTC): 2016-01-13 18:52
Parent(s): 8d8e32234dfdb1aab912ec79a12aa6fe3bb2960f
Signing key:
Tree: 661666a33596a12d0aee8ef8bd3d371e4a10e073
File |
Lines added |
Lines deleted |
deps.py |
2 |
3 |
File deps.py changed (mode: 100755) (index b5db766..5b2ce5d) |
... |
... |
def printLegend(): |
237 |
237 |
|
|
238 |
238 |
def listUnusedFuncs(mods): |
def listUnusedFuncs(mods): |
239 |
239 |
for mod in mods: |
for mod in mods: |
240 |
|
funcs = [x for x in mod.getAllExports() if x.isUnused()] |
|
|
240 |
|
funcs = [x for x in mod.getAllExports() |
|
241 |
|
if x.isUnused() and str(x) != 'main'] |
241 |
242 |
if len(funcs) == 0: |
if len(funcs) == 0: |
242 |
243 |
continue |
continue |
243 |
|
if len(funcs) == 1 and funcs[0] == 'main': |
|
244 |
|
continue |
|
245 |
244 |
|
|
246 |
245 |
print '--- unused from ' + str(mod) |
print '--- unused from ' + str(mod) |
247 |
246 |
for func in funcs: |
for func in funcs: |