Domanda

While checking my code with splint, I got one problem. At first i got an error on POSIXLIB. So I run splint with +posixlib as follows,

splint mss_client_main.c +posixlib -I ../include/

But i got the following error :

Splint 3.1.1 --- 15 Jun 2004

/usr/include/arpa/inet.h:35:27: Parse Error. (For help on parse errors, see
               splint -help parseerrors.)
*** Cannot continue.

How to resolve this error?

È stato utile?

Soluzione

Does your code compile?

That sort of error usually means that the line immediately preceding:

#include "inet.h"

has an error, such as a missing or superfluous semicolon, a macro with missing parentheses, or some other easy-to-miss syntax violation. The compiler will almost always catch this.

If your code compiles, two things come to mind:

Some static code checkers like splint don't like system headers. Set your configuration such that system directories are ignored. Check the man or info pages for the correct syntax.

Less likely: your inet.h or some file it includes is corrupt. It's unusual, but fairly simple to check for. Reinstalling the relevant package will correct this.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top