sparse (git://git.kernel.org/pub/scm/devel/sparse/sparse.git) is a static analyzer used in kernel dev. After installing it, it can easily be used with Lustre:
Currently there is about 3900 warnings. Most of it is noise, and a few annotations will silence them. However in that noise, some bugs might be lurking.
Besides finding bugs, it currently tags 1000 functions that can be made static. Once marked static, that will enable the compiler to optimize them more aggressively, which may lead to some minor performance improvements.
So far I've cleared about 1000 of them and found only one bug (strcmp with userspace provided buffer in fld_proc_hash_seq_write) and several unused functions.