Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For unused macros, you might want to take a look at <a href="http://coan2.sourceforge.net/index.php" rel="nofollow">coan</a>. It has options that might assist with this task. From the <a href="http://coan2.sourceforge.net/index.php?page=about" rel="nofollow">about page</a>:</p> <blockquote> <p>What symbols would appear within active preprocessor directives under a given configuration?</p> <p>(A preprocessor directive is active if it is not within the scope of any false #if). Supposing again that you are interested in the C-source in app, you can display a list of these symbols, with file names and line numbers, with the command:</p> <p>$>coan symbols --recurse --locate --active --once --filter c,h app</p> </blockquote> <p>It has options to remove conditioned out chunks of code (<code>#if 0</code> and friends), and many other useful features for dealing with the C preprocessor. I would use it to collect all the <code>#define</code>d symbols and all the <code>#ifdef</code> or <code>defined</code> symbols and friends. I'd sort and uniq those two collections of symbols and diff them. This is a pretty good way of locating typos. Then I'd take a histogram of them separately and start with the least frequent and work my way up the lists.</p> <p>For unused typedefs, that's another challenge. You could use a cross-reference type program like <a href="http://opengrok.github.io/OpenGrok/" rel="nofollow">OpenGrok</a> or <a href="http://www.gnu.org/software/global/" rel="nofollow">GNU Global</a>, but that's not very automatic.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload