splint giving error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

The small stupid piece of code is:
 1 /* program to find the return status*/
      2 #include<stdio.h>
      3 #include<stdlib.h>
      4 #include<unistd.h>
      5 int main(void)
      6 {
      7     exit(0);
      8 }

while using "splint" for checking coding errors, i got the following error message:
exit.c:3: Include file <unistd.h> matches the name of a POSIX library, but the
    POSIX library is not being used.  Consider using +posixlib or
    +posixstrictlib to select the POSIX library, or -warnposix to suppress this
    message
Header name matches a POSIX header, but the POSIX library is not selected.

Finished checking --- 1 code warning

As mentioned above this error message can be removed by using +posixlib switch as:
$ splint +posixlib exit.c
But while compiling this same stupid code using gcc with -Wall and -Werror I don't get any error message.
i.e.
$ gcc -Wall -Werror exit.c
So is this warning message (POSIX library, but thePOSIX library is not being used) a threat? and how to make my program an error free,warning free one

Thanks
~amit




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux