I get the following warning running splint
player.c:56:14: Unrecognized identifier: fdopen
Identifier used in code has not been declared. (Use -unrecog to inhibit
warning)
The source code includes both
#include <stdio.h>
as well as
if ((rnh = fdopen(argv[1][0] - 'a', "r")) == NULL)
{
perror("Unable to connect read pipe, quitting.");
exit(EXIT_FAILURE);
}
if ((wnh = fdopen(argv[1][1] - 'a', "w")) == NULL)
{
perror("Unable to connect write pipe, quitting.");
exit(EXIT_FAILURE);
}
Only the first call to fdopen is flagged. Just in case, I changed it to
if ((rnh = fdopen((int)(argv[1][0] - 'a'), "r")) == NULL)
in case the arguments were not being matched - no soap.
Any ideas what is wrong [with this code or splint]? The message doesn't help in either case.
Logged In: YES
user_id=61835
The function fdopen is part of the posix library.
By default Splint only recognizes functions defined in ANSI
standard C.
You can use the +posixlib flag to get Splint to recognize
functions from the posix library.