What is the best command-line tool to clean up code?

前端 未结 6 397
情话喂你
情话喂你 2020-12-12 11:58

When I\'m writing C - code I solely use an editor and gcc. I was wondering if anyone could suggest a good and simple tool that will find unused variables, function declarati

6条回答
  •  悲&欢浪女
    2020-12-12 12:18

    If you run gcc with -Wall, it'll catch some of the things you mention, such as unused variables (and perhaps unused functions). In terms of optimizations, I don't, though in general the compiler is smart enough to make the kinds of optimizations that matter, so I wouldn't worry too much. Just don't use horrible algorithms. ;-)

提交回复
热议问题