I know splint is to issue warning messages about problems in C programs.
I installed it on my Ubuntu using 'sudo apt-get install splint'.
How do I use it on a C program or programs?
I know splint is to issue warning messages about problems in C programs.
I installed it on my Ubuntu using 'sudo apt-get install splint'.
How do I use it on a C program or programs?
If you create the following C program in a file called test.c
you can then use splint
to perform a static analysis on the source to find possible problems.
The source code to put into the file test.c:
#include <stdio.h>
int main(int argc, char *argv[])
{
int a = 100;
int b[8];
printf("Hello c\n");
b[8] = 100; // error
return 0;
}
The command line used to run splint
against the C source file to check for problems.
$ splint test.c +bounds -paramuse -varuse