Debugging is both a science and an art. Sometimes, the simplest tool—the code listing—is the best debugging tool. At other times, however, you need to use other debugging tools. Three of these tools are
splint command is similar to the traditional UNIX
lint command: It statically examines source code for possible problems, and it also has many additional features. Even if your C code meets the standards for C and compiles cleanly, it might still contain errors.
splint performs many types of checks and can provide extensive error information. For example, this simple program might compile cleanly and even run:
matthew@seymour:~$ gcc -o tux tux.cmatthew@seymour:~$ ./tux ...