From yaminikrishna.sekuri at ge.com Tue Aug 3 05:05:30 2004 From: yaminikrishna.sekuri at ge.com (Sekuri, Yaminikrishna (GE Consumer & Industrial)) Date: Wed Mar 22 17:10:38 2006 Subject: [splint-discuss] Parse error with pthread Message-ID: <09A97B4DFB4DB64FB8B58BBC4A1F3C290614358B@GNTMLVEM01.e2k.ad.ge.com> Hi All, I am using SPLINT to check my code for ANSI compliance. I get the Parser error with respect to pthreads. My source code file source.c includes a file xyz.h which in turn has pthread_t structure and a function which return this structure. When I try doing ./splint source.c, I get the following parse error: In file included from source.c:45 /usr/include/bits/pthreadtypes.h:48:9: Parse Error. (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. Can anyone suggest what has to be done to overcome this parse error. Thanks & Regards, Yamini From cbfalconer at yahoo.com Tue Aug 3 23:38:30 2004 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:39 2006 Subject: [splint-discuss] Parse error with pthread References: <09A97B4DFB4DB64FB8B58BBC4A1F3C290614358B@GNTMLVEM01.e2k.ad.ge.com> Message-ID: <41105A35.16674A9E@yahoo.com> "Sekuri, Yaminikrishna (GE Consumer & Industrial)" wrote: > > I am using SPLINT to check my code for ANSI compliance. > I get the Parser error with respect to pthreads. > My source code file source.c includes a file xyz.h which in turn > has pthread_t structure and a function which return this structure. > > When I try doing ./splint source.c, > I get the following parse error: > In file included from source.c:45 > /usr/include/bits/pthreadtypes.h:48:9: > Parse Error. (For help on parse errors, see splint -help parseerrors.) > *** Cannot continue. > > Can anyone suggest what has to be done to overcome this parse > error. You are trying to verify system headers, which need not be standard. Check your environment settins for larch_path and include *during splint execution*. At any rate, this is misuse of splint. Your compiler is intended to detect all syntax errors, and pass all correct syntax. Splint is intended to warn about all suspicious usage. You would be better advised to check syntax with: gcc -W -Wall -ansi -pedantic -Wwrite-strings -gstabs+ -O1 (I have an alias set so that is used routinely) Replace -ansi with -std=C99 if desired. -- "I'm a war president. I make decisions here in the Oval Office in foreign policy matters with war on my mind." - Bush. "Churchill and Bush can both be considered wartime leaders, just as Secretariat and Mr Ed were both horses." - James Rhodes. From mike at odyne.com Mon Aug 23 13:39:48 2004 From: mike at odyne.com (Mike Solem) Date: Wed Mar 22 17:10:39 2006 Subject: [splint-discuss] .splintrc and dir names with spaces Message-ID: Hello, I'm using splint on windows XP. Some of my directories and filenames have spaces in them. I can't get them added to my path using the .splintrc file. This is what I've tried: -I../../with space -I"../../with space" -I'../../with space' -I../../with\ space -I"../../with\ space" Only one of the lines above are in the file at a time of course. When dealing with files/directories that don't have spaces, it all works fine. When using the above, I either get parse errors, or it just doesn't include the directory I want. On the faq it says to call the file splint.rc and not .splintrc. When I call it splint.rc, the file is not read. When it's called .splintrc it is read. Anyone know how to deal with spaces? Thanks. Mike -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ From cbfalconer at yahoo.com Tue Aug 24 07:39:16 2004 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:39 2006 Subject: [splint-discuss] .splintrc and dir names with spaces References: Message-ID: <412B28E4.6F48AD26@yahoo.com> Mike Solem wrote: > > I'm using splint on windows XP. Some of my directories and > filenames have spaces in them. I can't get them added to my > path using the .splintrc file. This is a perennial problem. The simplest answer is don't create those directories in the first place. > ... snip ... > > On the faq it says to call the file splint.rc and not .splintrc. > When I call it splint.rc, the file is not read. When it's > called .splintrc it is read. The faq is unix/linux oriented. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From avv at nl.ibm.com Tue Aug 24 10:00:05 2004 From: avv at nl.ibm.com (Arjan M Van Vught) Date: Wed Mar 22 17:10:39 2006 Subject: [splint-discuss] .splintrc and dir names with spaces In-Reply-To: <412B28E4.6F48AD26@yahoo.com> Message-ID: Please find below my splint.ini for Windows 2000. Directories with spaces is possible. -IC:/Progra~1/IBM/WBIMBV5/include/plugin -IC:/Progra~1/IBM/WBIMBV5/sample/extensions/nodes -IE:/src -IE:/src/gnu -IE:/src/os/win32 -IE:/SimpleSMTP -IE:/mime -IE:/ma0p -IE:/unzip101b/include -D_M_IX86=400 -DWIN32 -D_NTSYSTEM -D_WIN32_WINNT=0x0400 -DWINVER=0x0400 -DNOGDI -DNOKERNEL -DNOUSER -DWIN32_LEAN_AND_MEAN -likelybool -D__int64=long -D_int64=int -D_wtoi=atoi Met vriendelijke groeten / Kind regards, Arjan van Vught Application Architect (BI), e-business Hosting Services, IBM Global Services EMEA - Exchange for WebSphere MQ - B2B/EDI B2B Hub --> http://edi.services.ibm.com/mqseries/spec_sheets.shtml CBFalconer To Sent by: Discussions about the Splint splint-discuss-bo annotation-assisted static analysis unces@cs.virginia project .edu cc 08/24/2004 01:39 Subject PM Re: [splint-discuss] .splintrc and dir names with spaces Please respond to cbfalconer and Discussions about the Splint annotation-assist ed static analysis project Mike Solem wrote: > > I'm using splint on windows XP. Some of my directories and > filenames have spaces in them. I can't get them added to my > path using the .splintrc file. This is a perennial problem. The simplest answer is don't create those directories in the first place. > ... snip ... > > On the faq it says to call the file splint.rc and not .splintrc. > When I call it splint.rc, the file is not read. When it's > called .splintrc it is read. The faq is unix/linux oriented. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! _______________________________________________ splint-discuss mailing list splint-discuss@cs.virginia.edu http://www.splint.org/mailman/listinfo/splint-discuss From mike at odyne.com Tue Aug 24 11:28:34 2004 From: mike at odyne.com (Mike Solem) Date: Wed Mar 22 17:10:39 2006 Subject: [splint-discuss] .splintrc and dir names with spaces In-Reply-To: References: Message-ID: I see what you're doing, but can't get it to work for what I want. I'm assuming ~1 is some kind of name completion symbol. It seems to only work when there are 6 preceding characters. Example: -IC:/Docume~1/mydir # Works -IC:/Docum~1/mydir # Doesn't work -IC:/Documen~1/mydir # Doesn't work Looks like you also had 6 chars in your file (Progra~1). Is there any way around this limitation? Thanks. Mike On Tue, 24 Aug 2004 16:00:05 +0200, Arjan M Van Vught wrote: > > > > > Please find below my splint.ini for Windows 2000. Directories with spaces > is possible. > > -IC:/Progra~1/IBM/WBIMBV5/include/plugin > -IC:/Progra~1/IBM/WBIMBV5/sample/extensions/nodes > -IE:/src > -IE:/src/gnu > -IE:/src/os/win32 > -IE:/SimpleSMTP > -IE:/mime > -IE:/ma0p > -IE:/unzip101b/include > -D_M_IX86=400 > -DWIN32 > -D_NTSYSTEM > -D_WIN32_WINNT=0x0400 > -DWINVER=0x0400 > -DNOGDI > -DNOKERNEL > -DNOUSER > -DWIN32_LEAN_AND_MEAN > -likelybool > -D__int64=long > -D_int64=int > -D_wtoi=atoi > > Met vriendelijke groeten / Kind regards, > > Arjan van Vught > > Application Architect (BI), e-business Hosting Services, IBM Global > Services > EMEA - Exchange for WebSphere MQ - B2B/EDI > B2B Hub --> http://edi.services.ibm.com/mqseries/spec_sheets.shtml > > > > CBFalconer > > To Sent by: Discussions about the Splint splint- > discuss-bo annotation-assisted static analysis unces@cs.virginia > project .edu discuss@cs.virginia.edu> cc > 08/24/2004 01:39 Subject PM > Re: [splint-discuss] .splintrc and dir names with spaces > Please respond to cbfalconer > and Discussions about > the Splint annotation- > assist ed static > analysis project > > > > > > > > Mike Solem wrote: >> >> I'm using splint on windows XP. Some of my directories and >> filenames have spaces in them. I can't get them added to my >> path using the .splintrc file. > > This is a perennial problem. The simplest answer is don't create > those directories in the first place. > >> > ... snip ... >> >> On the faq it says to call the file splint.rc and not .splintrc. >> When I call it splint.rc, the file is not read. When it's >> called .splintrc it is read. > > The faq is unix/linux oriented. > > -- > Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) > Available for consulting/temporary embedded and systems. > USE worldnet address! > > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ From Ralf.Wildenhues at gmx.de Tue Aug 24 11:42:40 2004 From: Ralf.Wildenhues at gmx.de (Ralf Wildenhues) Date: Wed Mar 22 17:10:39 2006 Subject: [splint-discuss] .splintrc and dir names with spaces In-Reply-To: References: Message-ID: <20040824154240.GA15925@iam.uni-bonn.de> * Mike Solem wrote on Tue, Aug 24, 2004 at 05:28:34PM CEST: > I see what you're doing, but can't get it to work for what I want. > I'm assuming ~1 is some kind of name completion symbol. It seems > to only work when there are 6 preceding characters. Example: > > -IC:/Docume~1/mydir # Works > -IC:/Docum~1/mydir # Doesn't work > -IC:/Documen~1/mydir # Doesn't work > > Looks like you also had 6 chars in your file (Progra~1). Is there any > way around this limitation? This has nothing to do with splint whatsoever. It is a legacy feature of windows, providing backward compatibility of some sort to pre-VFAT (DOS) style of 8.3 filenames (through a non-unique, history-dependent mapping of long file names to short ones). Use as kludge to get around the fact that splint does not really allow to provide spaces in options within the splintrc file. Still, somebody please fix this within splint, as it would IMHO hurt very little on backwards compatibility (anybody having directories with a " in their name should be considered insane anyway), and is the more useful for macro definitions (-Dfoo="bar baz"). These, btw, need to be fixed on the command line as well (why?). Regards, Ralf From mike.williams at globalgraphics.com Tue Aug 24 11:44:09 2004 From: mike.williams at globalgraphics.com (Mike Williams) Date: Wed Mar 22 17:10:40 2006 Subject: [splint-discuss] .splintrc and dir names with spaces In-Reply-To: References: Message-ID: <200408241542.i7OFgANw012095@woof.man.harlequin.co.uk> On 24 Aug 2004 at 11:28, Mike Solem wrote: > I see what you're doing, but can't get it to work for what I want. > I'm assuming ~1 is some kind of name completion symbol. It seems > to only work when there are 6 preceding characters. Example: > > -IC:/Docume~1/mydir # Works > -IC:/Docum~1/mydir # Doesn't work > -IC:/Documen~1/mydir # Doesn't work > > Looks like you also had 6 chars in your file (Progra~1). Is there any > way around this limitation? > Thanks. Use 'dir /x' from a command prompt in the directory containing the long directory names. This will show you the shortened version of the directory names which you can use. TTFN > Mike > > > On Tue, 24 Aug 2004 16:00:05 +0200, Arjan M Van Vught > wrote: > > > > > > > > > > > Please find below my splint.ini for Windows 2000. Directories with spaces > > is possible. > > > > -IC:/Progra~1/IBM/WBIMBV5/include/plugin > > -IC:/Progra~1/IBM/WBIMBV5/sample/extensions/nodes > > -IE:/src > > -IE:/src/gnu > > -IE:/src/os/win32 > > -IE:/SimpleSMTP > > -IE:/mime > > -IE:/ma0p > > -IE:/unzip101b/include > > -D_M_IX86=400 > > -DWIN32 > > -D_NTSYSTEM > > -D_WIN32_WINNT=0x0400 > > -DWINVER=0x0400 > > -DNOGDI > > -DNOKERNEL > > -DNOUSER > > -DWIN32_LEAN_AND_MEAN > > -likelybool > > -D__int64=long > > -D_int64=int > > -D_wtoi=atoi > > > > Met vriendelijke groeten / Kind regards, > > > > Arjan van Vught > > > > Application Architect (BI), e-business Hosting Services, IBM Global > > Services > > EMEA - Exchange for WebSphere MQ - B2B/EDI > > B2B Hub --> http://edi.services.ibm.com/mqseries/spec_sheets.shtml > > > > > > > > CBFalconer > > > > To Sent by: Discussions about the Splint splint- > > discuss-bo annotation-assisted static analysis unces@cs.virginia > > project .edu > discuss@cs.virginia.edu> cc > > 08/24/2004 01:39 Subject PM > > Re: [splint-discuss] .splintrc and dir names with spaces > > Please respond to cbfalconer > > and Discussions about > > the Splint annotation- > > assist ed static > > analysis project > > > > > > > > > > > > > > > > Mike Solem wrote: > >> > >> I'm using splint on windows XP. Some of my directories and > >> filenames have spaces in them. I can't get them added to my > >> path using the .splintrc file. > > > > This is a perennial problem. The simplest answer is don't create > > those directories in the first place. > > > >> > > ... snip ... > >> > >> On the faq it says to call the file splint.rc and not .splintrc. > >> When I call it splint.rc, the file is not read. When it's > >> called .splintrc it is read. > > > > The faq is unix/linux oriented. > > > > -- > > Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) > > Available for consulting/temporary embedded and systems. > > USE worldnet address! > > > > > > _______________________________________________ > > splint-discuss mailing list > > splint-discuss@cs.virginia.edu > > http://www.splint.org/mailman/listinfo/splint-discuss > > > > > > _______________________________________________ > > splint-discuss mailing list > > splint-discuss@cs.virginia.edu > > http://www.splint.org/mailman/listinfo/splint-discuss > > > > > > -- > Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss Mike -- Herb gardeners are always looking for sage advice. From cbfalconer at yahoo.com Wed Aug 25 10:35:04 2004 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:40 2006 Subject: [splint-discuss] .splintrc and dir names with spaces References: <20040824154240.GA15925@iam.uni-bonn.de> Message-ID: <412CA398.1014A513@yahoo.com> Ralf Wildenhues wrote: > > * Mike Solem wrote on Tue, Aug 24, 2004 at 05:28:34PM CEST: > > I see what you're doing, but can't get it to work for what I want. > > I'm assuming ~1 is some kind of name completion symbol. It seems > > to only work when there are 6 preceding characters. Example: > > > > -IC:/Docume~1/mydir # Works > > -IC:/Docum~1/mydir # Doesn't work > > -IC:/Documen~1/mydir # Doesn't work > > > > Looks like you also had 6 chars in your file (Progra~1). Is there any > > way around this limitation? > > This has nothing to do with splint whatsoever. It is a legacy feature > of windows, providing backward compatibility of some sort to pre-VFAT > (DOS) style of 8.3 filenames (through a non-unique, history-dependent > mapping of long file names to short ones). Use as kludge to get around > the fact that splint does not really allow to provide spaces in options > within the splintrc file. The rule is quite simple. Discard all '.' except the last. Discard all blanks. Truncate the file extension to 3 chars. Truncate the file name portion to 8 chars. If the result is not identical to the original long name, replace the last two chars of the file name with ~1 (increase the digit if there is a collision with other names in the directory). This is the short name. Even Exploder has the capability of showing the short names - I think they are referred to as MsDos names. Windoze can be configured to simply truncate the filename portion when no collision occurs, after which the ~n thing reappears. However the best way to see is to use the dosbox and the dir command. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From rdbisch at ilstu.edu Sun Aug 29 01:17:00 2004 From: rdbisch at ilstu.edu (Rick Bischoff) Date: Wed Mar 22 17:10:40 2006 Subject: [splint-discuss] newbie question Message-ID: Hello, I just started using splint and can't seem to figure out how to get rid of this error: x.c: (in function x_init) x.c:26:14: Passed storage X.whiteTracker contains 2 undefined fields: stack, tos Storage derivable from a parameter, return value or global is not defined. Use /*@out@*/ to denote passed or returned storage which need not be defined. (Use -compdef to inhibit warning) Where "X" is "typdef struct { FStack whiteTracker; /* other members */ } XStruct;" and then "Xstruct X" inside of the "x_init" function body. The line in question is: fstack_init(&X.whiteTracker) which simply initializes the allocated structure. I tried the following: (fstack_init is "void fstack_init(FStack* foo);" A. add /* @out foo*/ to the function declaration in "fstack.h" B. add /* @out foo*/ tot the function definition in "fstack.c" C. Both A & B. D. running "splint x.c fstack.c" E. running "splint fstack.c" (produces no warnings or errors) The error message just doesn't want to go away. What am I doing wrong? Rick Bischoff From martin at krischik.com Sun Aug 29 02:30:24 2004 From: martin at krischik.com (Martin Krischik) Date: Wed Mar 22 17:10:40 2006 Subject: [splint-discuss] newbie question In-Reply-To: References: Message-ID: <200408290830.24900.martin@krischik.com> Am Sonntag, 29. August 2004 07:17 schrieb Rick Bischoff: > Hello, > > I just started using splint and can't seem to figure out how to get rid > of this error: > > x.c: (in function x_init) > x.c:26:14: Passed storage X.whiteTracker contains 2 undefined fields: > stack, tos > Storage derivable from a parameter, return value or global is not > defined. > Use /*@out@*/ to denote passed or returned storage which need not be > defined. > (Use -compdef to inhibit warning) > > > Where "X" is "typdef struct { FStack whiteTracker; /* other members */ > } XStruct;" and then "Xstruct X" inside of the "x_init" function body. > > The line in question is: > > fstack_init(&X.whiteTracker) > > which simply initializes the allocated structure. I tried the > following: (fstack_init is "void fstack_init(FStack* foo);" > > A. add /* @out foo*/ to the function declaration in "fstack.h" Just a hint: no space allowed between "/*" and "@" - it needs to be "/*@out". > B. add /* @out foo*/ tot the function definition in "fstack.c" > C. Both A & B. > D. running "splint x.c fstack.c" > E. running "splint fstack.c" (produces no warnings or errors) > > The error message just doesn't want to go away. What am I doing wrong? > > Rick Bischoff > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss -- Martin Krischik Papenkamp 33 D-30539 Hannover Tel. 0511-5198556 mailto://Martin@krischik.com http://www.krischik.com