This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 179277 - splint generates Parse Error on C code using pthread.h
splint generates Parse Error on C code using pthread.h
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: splint (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-29 14:58 EST by James Hunt
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-06 10:54:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Hunt 2006-01-29 14:58:31 EST
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-30 19:17:57 EST
splint is in Extras now.
Comment 2 Paul Nasrat 2006-02-06 10:54:36 EST
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.