Remark #177: Variable x was Declared but never referenced

There are several common cases where code will not be executed.

Example #1: from Linux-2.6-rc3 file sound/pci/au88x0/au88x0_xtalk.c

     50 static xtalk_gains_t const asXtalkGainsDefault = {
     51         0x4000, 0x4000, 4000, 0x4000, 4000, 0x4000, 4000, 0x4000, 4000,
     52         0x4000
     53 };

asXtalkGainsDefault is not referenced anywhere else in the file

How to resolve:

Removing unneccesary code is usually the preferred course of action.

Caution: should be taken to make sure that the code is not referenced by another architecture or code that is hidden by an #ifdef or other code Logo