simsong / bulk_extractor

This is the development tree. Production downloads are at:
https://github.com/simsong/bulk_extractor/releases
Other
1.09k stars 187 forks source link

automatically identify unused functions and then remove them from the code base #395

Open simsong opened 1 year ago

simsong commented 1 year ago

Tools that might help:

jonstewart commented 1 year ago

-Wno-unused-function may work, maybe, with clang. See https://github.com/llvm/llvm-project/issues/55492

On Sun, Apr 2, 2023 at 12:46 PM Simson L. Garfinkel < @.***> wrote:

Tools that might help:

— Reply to this email directly, view it on GitHub https://github.com/simsong/bulk_extractor/issues/395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKVVPYLERVA63DRDZOG6LW7GUPLANCNFSM6AAAAAAWQM6QOY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

simsong commented 1 year ago

-Wno-unused-function may work, maybe, with clang. See llvm/llvm-project#55492 On Sun, Apr 2, 2023 at 12:46 PM Simson L. Garfinkel < @.> wrote: Tools that might help: - https://github.com/caolanm/callcatcher - https://www.frama-c.com/ - https://github.com/mgehre/xunused - https://cppcheck.sourceforge.io/ - https://github.com/analysis-tools-dev/static-analysis — Reply to this email directly, view it on GitHub <#395>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABKVVPYLERVA63DRDZOG6LW7GUPLANCNFSM6AAAAAAWQM6QOY . You are receiving this because you are subscribed to this thread.Message ID: @.>

That only works for static functions within a single file, IIRC. Otherwise you can only tell at linkage. And if A() calls B() but nothing calls A() it will only detect A().

simsong commented 1 year ago

-Wno-unused-function may work, maybe, with clang. See llvm/llvm-project#55492

That only works for static functions within a single file, IIRC. Otherwise you can only tell at linkage. And if A() calls B() but nothing calls A() it will only detect A().