>David Hawkins wrote:
>>
>>> Given the following command line arguments
>>> (RedHat Linux 9.0 machine, Linux 2.4.20-8 kernel):
>>>
>>> splint +posixlib buffer_queue.c -I../boolean
>>>
>>> where I have used a pthread_mutex_t inside the
>>> buffer queue implementation to protect it.
>>>
>>> I'm getting the following parse error
>>>
>>> Splint 3.0.1.7 --- 24 Jan 2003
>>>
>>> /usr/include/bits/sigthread.h:33:18: Parse Error:
>>>     Inconsistent function parameter syntax: __sigset_t :
>>>     <any>. (For help on parse errors, see splint -help parseerrors.)
>>> *** Cannot continue.
>>>
>>> What can I do to eliminate this error?
>>
---
>
>As far as I can see you don't show the line(s) that trigger the
>parse error.  If the fault is in the system headers, then you
>should see what (if any) extensions are being used therein.  The
>name __sigset_t is in the system namespace.
>
>In general system headers should not be checked by splint.

Hi

If this can be of any help.

I have Splint 3.1.1 --- 02 May 2003 on Cygwin version 2.340.2.5.
and splint gives a parse error in, pthread.h file:


------------------------
[joy ~ ]$splint +posixlib debug.c
Splint 3.1.1 --- 02 May 2003

/usr/include/pthread.h:72:43: Parse Error. (For help on parse errors, see
               splint -help parseerrors.)
*** Cannot continue.
----------------------

/usr/include/pthread.h

67:#define PTHREAD_SCOPE_PROCESS 0
68:#define PTHREAD_SCOPE_SYSTEM 1
70:
71: /* Attributes */
72: int pthread_attr_destroy (pthread_attr_t *);
73: int pthread_attr_getdetachstate (const pthread_attr_t *, int *);
74: int pthread_attr_getinheritsched (const pthread_attr_t *, int *);
75: int pthread_attr_getschedparam (const pthread_attr_t *, struct sched_param
*);
76: int pthread_attr_getschedpolicy (const pthread_attr_t *, int *);

----------------------
and this was the source file, debug.c
------------------------
#include <pthread.h>
static pthread_mutex_t mutex;

/* Create */
int init(void)
{
        int status;

            /* mutex */
            status = pthread_mutex_init(&mutex, NULL);
                return status;
}

/* Destroy */
int destroy(void)
{
        int status;

            /* mutex */
            status = pthread_mutex_destroy(&mutex);
                return status;
}

/* Added main here to compile with gcc */

int main(void)
{
    return 0;
}

----------------------
The code compiles successfully in gcc, so is this a problem with splint?

Saravana



****************************************************************************************

Note: The information contained in this message may be privileged and confidential and 
thus protected from disclosure. If the reader of this message is not the intended 
recipient, or an employee or agent responsible for delivering this message to the 
intended recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is strictly prohibited. If you have received this 
communication in error, please notify us immediately by replying to the message and 
deleting it from your computer. Thank you. 

****************************************************************************************
_______________________________________________
splint-discuss mailing list
[EMAIL PROTECTED]
http://www.splint.org/mailman/listinfo/splint-discuss

Reply via email to