Bug 179277 - splint generates Parse Error on C code using pthread.h
Summary: splint generates Parse Error on C code using pthread.h
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: splint
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-29 19:58 UTC by James Hunt
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-06 15:54:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Hunt 2006-01-29 19:58:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
Running splint against any C code that uses Posix threads (and thus has to include pthread.h) results in a splint Parse Error.


Version-Release number of selected component (if applicable):
splint-3.1.1-10.fc4

How reproducible:
Always

Steps to Reproduce:
1. create a file, "pthread.c" containing the following:

#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>

int main(int argc, char **argv) { return 0; }

2. Run, "splint pthread.c"
  

Actual Results:  Splint 3.1.1 --- 28 Jul 2005

/usr/include/pthread.h:609:17: Parse Error:
               New function scope inside function. (For help on parse errors,
               see splint -help parseerrors.)
*** Cannot continue.


Expected Results:  No errors.

Additional info:

Running, "gcc -Wall -pedantic pthread.c" shows zero warnings/errors, and an "a.out" file is generated which runs as expected.

Comment 1 Miloslav Trmač 2006-01-31 00:17:57 UTC
splint is in Extras now.

Comment 2 Paul Nasrat 2006-02-06 15:54:36 UTC
splint-3.1.1-11.fc5.i386


Splint 3.1.1 --- 16 Jan 2006

pthread.c: (in function main)
pthread.c:5:14: Parameter argc not used
  A function parameter is not used in the body of the function. If the argument
  is needed for type compatibility or future plans, use /*@unused@*/ in the
  argument declaration. (Use -paramuse to inhibit warning)
pthread.c:5:27: Parameter argv not used

Finished checking --- 2 code warnings



Note You need to log in before you can comment on or make changes to this bug.