From margiodo at gmail.com Thu Apr 14 04:41:29 2011 From: margiodo at gmail.com (domenico margiotta) Date: Thu, 14 Apr 2011 10:41:29 +0200 Subject: [splint-discuss] Difference and correct use of splint Message-ID: Hi everybody, I'm new user in this mailing-list and my english is not beautiful. I'm sorry for my writing errors. What's the difference between the command lint and splint? How is the right command to replicate the same command? e.g. lint myfile.c Because if i'll run splitn myfile.c, i receive this error message "Cannot continue". Why? How is the right option to use? Best regard, Domenico -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20110414/90d41977/attachment.html From Michael.Wojcik at microfocus.com Thu Apr 14 09:05:42 2011 From: Michael.Wojcik at microfocus.com (Michael Wojcik) Date: Thu, 14 Apr 2011 06:05:42 -0700 Subject: [splint-discuss] Difference and correct use of splint In-Reply-To: References: Message-ID: <81F42F63D5BB344ABF294F8E80990C7905469D7C@MTV-EXCHANGE.microfocus.com> > From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss- > bounces at cs.virginia.edu] On Behalf Of domenico margiotta > Sent: Thursday, 14 April, 2011 04:41 > To: splint-discuss at mail.cs.virginia.edu > Subject: [splint-discuss] Difference and correct use of splint > What's the difference between the command lint and splint? "lint" refers to any of a number of programs designed to check C source code for common errors and possibly-incorrect constructs. Since Stephen Johnson's original lint program (which appeared in the early '70s), a number of implementations of lint have been written. "splint" is a specific static C source code analyzer. It's part of the family of lint programs, but it has many additional features. It originally focused on security-related errors such as buffer overflows, but these days can be used for many purposes. > How is the right command to replicate the same command? > e.g. lint myfile.c > Because if i'll run splitn myfile.c, i receive this error message > "Cannot continue". You'll have to consult the splint documentation. You may have found a bug in splint, but it's more likely that one of the following is the case: - You need to provide splint with additional information about your source code - Your code uses constructs which are not part of standard C, or are part of C99 but not supported by splint - Your code contains errors that are severe enough to prevent splint from parsing it -- Michael Wojcik Principal Software Systems Developer, Micro Focus This message has been scanned by MailController - portal1.mailcontroller.co.uk From margiodo at gmail.com Thu Apr 14 09:34:01 2011 From: margiodo at gmail.com (domenico margiotta) Date: Thu, 14 Apr 2011 15:34:01 +0200 Subject: [splint-discuss] Difference and correct use of splint In-Reply-To: <81F42F63D5BB344ABF294F8E80990C7905469D7C@MTV-EXCHANGE.microfocus.com> References: <81F42F63D5BB344ABF294F8E80990C7905469D7C@MTV-EXCHANGE.microfocus.com> Message-ID: Thanks alot for the answer. I think I didn't find any bug. Where I work, we programmed embedded software and so I think it is the cause that splint said me "Cannot continue". Best Regard, Domenico 2011/4/14 Michael Wojcik > > From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss- > > bounces at cs.virginia.edu] On Behalf Of domenico margiotta > > Sent: Thursday, 14 April, 2011 04:41 > > To: splint-discuss at mail.cs.virginia.edu > > Subject: [splint-discuss] Difference and correct use of splint > > > What's the difference between the command lint and splint? > > "lint" refers to any of a number of programs designed to check C source > code for common errors and possibly-incorrect constructs. Since Stephen > Johnson's original lint program (which appeared in the early '70s), a > number of implementations of lint have been written. > > "splint" is a specific static C source code analyzer. It's part of the > family of lint programs, but it has many additional features. It > originally focused on security-related errors such as buffer overflows, > but these days can be used for many purposes. > > > How is the right command to replicate the same command? > > > e.g. lint myfile.c > > > Because if i'll run splitn myfile.c, i receive this error message > > "Cannot continue". > > You'll have to consult the splint documentation. You may have found a > bug in splint, but it's more likely that one of the following is the > case: > > - You need to provide splint with additional information about your > source code > > - Your code uses constructs which are not part of standard C, or are > part of C99 but not supported by splint > > - Your code contains errors that are severe enough to prevent splint > from parsing it > > -- > Michael Wojcik > Principal Software Systems Developer, Micro Focus > > This message has been scanned by MailController - > portal1.mailcontroller.co.uk > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20110414/47a5b207/attachment.html From Michael.Wojcik at microfocus.com Thu Apr 14 10:23:56 2011 From: Michael.Wojcik at microfocus.com (Michael Wojcik) Date: Thu, 14 Apr 2011 07:23:56 -0700 Subject: [splint-discuss] Difference and correct use of splint In-Reply-To: References: <81F42F63D5BB344ABF294F8E80990C7905469D7C@MTV-EXCHANGE.microfocus.com> Message-ID: <81F42F63D5BB344ABF294F8E80990C7905469D80@MTV-EXCHANGE.microfocus.com> > From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of domenico margiotta > Sent: Thursday, 14 April, 2011 09:34 > To: Discussions about the Splint annotation-assisted static analysis project > Subject: Re: [splint-discuss] Difference and correct use of splint > Thanks alot for the answer. I think I didn't find any bug. Where I work, > we programmed embedded software and so I think it is the cause that > splint said me "Cannot continue". Without seeing the actual, complete set of Splint error messages, there's no way for anyone on this list to help you any further. Splint works fine on C source for embedded systems, if it's standard C. -- Michael Wojcik Principal Software Systems Developer, Micro Focus This message has been scanned by MailController - portal1.mailcontroller.co.uk From margiodo at gmail.com Thu Apr 14 11:13:39 2011 From: margiodo at gmail.com (domenico margiotta) Date: Thu, 14 Apr 2011 17:13:39 +0200 Subject: [splint-discuss] Difference and correct use of splint In-Reply-To: <81F42F63D5BB344ABF294F8E80990C7905469D80@MTV-EXCHANGE.microfocus.com> References: <81F42F63D5BB344ABF294F8E80990C7905469D7C@MTV-EXCHANGE.microfocus.com> <81F42F63D5BB344ABF294F8E80990C7905469D80@MTV-EXCHANGE.microfocus.com> Message-ID: This is the output of splint command. If it's complete ok else you will say me what I must post. Here the output: Splint 3.1.2 --- 03 May 2009 RDC_BootLoader_ext.h:65:92: `#' operator is not followed by a macro argument ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? name ??Preprocessing error. (Use -preproc to inhibit warning) ?? In file included from RDC_BootProvideService_ext.h:23, ?? ? ? ? ? ? ? ? from RDC_BootProvideService.h:22, ?? ? ? ? ? ? ? ? from RDC_BootProvideService.c:19 RDC_BootLoader_ext.h:66:108: `#' operator is not followed by a macro argument ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?name RDC_BootLoader_ext.h:67:106: `#' operator is not followed by a macro argument ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?name RDC_BootLoader_ext.h:68:86: `#' operator is not followed by a macro argument ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? name Preprocessing error for file: /home/margiodo/Scrivania/compile/RDC_BootProvideSe ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? rvice.c *** Cannot continue. 2011/4/14 Michael Wojcik > > > From: splint-discuss-bounces at cs.virginia.edu > [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of domenico > margiotta > > Sent: Thursday, 14 April, 2011 09:34 > > To: Discussions about the Splint annotation-assisted static analysis > project > > Subject: Re: [splint-discuss] Difference and correct use of splint > > > Thanks alot for the answer. I think I didn't find any bug. Where I > work, > > we programmed embedded software and so I think it is the cause that > > splint said me "Cannot continue". > > Without seeing the actual, complete set of Splint error messages, > there's no way for anyone on this list to help you any further. Splint > works fine on C source for embedded systems, if it's standard C. > > -- > Michael Wojcik > Principal Software Systems Developer, Micro Focus > > > This message has been scanned by MailController - portal1.mailcontroller.co.uk > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss From splint at sympatico.ca Thu Apr 14 11:47:26 2011 From: splint at sympatico.ca (Bill Pringlemeir) Date: Thu, 14 Apr 2011 11:47:26 -0400 Subject: [splint-discuss] Difference and correct use of splint In-Reply-To: (domenico margiotta's message of "Thu, 14 Apr 2011 17:13:39 +0200") References: <81F42F63D5BB344ABF294F8E80990C7905469D7C@MTV-EXCHANGE.microfocus.com> <81F42F63D5BB344ABF294F8E80990C7905469D80@MTV-EXCHANGE.microfocus.com> Message-ID: On 14 Apr 2011, margiodo at gmail.com wrote: > This is the output of splint command. If it's complete ok else you > will say me what I must post. > > Here the output: > > Splint 3.1.2 --- 03 May 2009 > RDC_BootLoader_ext.h:65:92: `#' operator is not followed by a macro argument You can show us lines '60-70' of RDC_BootLoader_ext.h or make an alternative to these lines using the following conditional code, #ifndef S_SPLINT_S /* non standard code. */ #else /* simplified splint versions. */ #endif hth, Bill Pringlemeir. From Michael.Wojcik at microfocus.com Thu Apr 14 11:48:14 2011 From: Michael.Wojcik at microfocus.com (Michael Wojcik) Date: Thu, 14 Apr 2011 08:48:14 -0700 Subject: [splint-discuss] Difference and correct use of splint In-Reply-To: References: <81F42F63D5BB344ABF294F8E80990C7905469D7C@MTV-EXCHANGE.microfocus.com><81F42F63D5BB344ABF294F8E80990C7905469D80@MTV-EXCHANGE.microfocus.com> Message-ID: <81F42F63D5BB344ABF294F8E80990C7905469D81@MTV-EXCHANGE.microfocus.com> > From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss- > bounces at cs.virginia.edu] On Behalf Of domenico margiotta > Sent: Thursday, 14 April, 2011 11:14 > To: Discussions about the Splint annotation-assisted static analysis > project > Subject: Re: [splint-discuss] Difference and correct use of splint > > Here the output: > > Splint 3.1.2 --- 03 May 2009 > RDC_BootLoader_ext.h:65:92: `#' operator is not followed by a macro > argument > ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? name > ??Preprocessing error. (Use -preproc to inhibit warning) > ?? In file included from RDC_BootProvideService_ext.h:23, > ?? ? ? ? ? ? ? ? from RDC_BootProvideService.h:22, > ?? ? ? ? ? ? ? ? from RDC_BootProvideService.c:19 Splint is saying that RDC_BootLoader_ext.h contains invalid C syntax. The "#" operator (also called the "stringize operator") must be followed by the name of a parameter to a function-style macro. For example: #define stringize(x) #x is a valid use of this operator. Without seeing what's on line 65 of RDC_BootLoader_ext.h, we can't say more. It's possible that the C implementation (ie, the compiler) you use supports non-standard syntax, and you're using it in this file. In that case, you may be able to get Splint to ignore it by wrapping the lines containing non-standard source with Splint compilation guards. For example: #if !defined(S_SPLINT_S) /* non-standard constructs go here */ #endif However, if the rest of your code depends on items defined or declared by the guarded code, you will run into other problems. It's usually possible to work around these, but it requires a solid understanding of how Splint works. -- Michael Wojcik Principal Software Systems Developer, Micro Focus This message has been scanned by MailController - portal1.mailcontroller.co.uk From ok at cs.otago.ac.nz Thu Apr 14 19:25:59 2011 From: ok at cs.otago.ac.nz (ok at cs.otago.ac.nz) Date: Fri, 15 Apr 2011 11:25:59 +1200 Subject: [splint-discuss] Difference and correct use of splint In-Reply-To: References: <81F42F63D5BB344ABF294F8E80990C7905469D7C@MTV-EXCHANGE.microfocus.com> <81F42F63D5BB344ABF294F8E80990C7905469D80@MTV-EXCHANGE.microfocus.com> Message-ID: <2698ca0e9491ad340f56f93384618d5c.squirrel@chasm.otago.ac.nz> > This is the output of splint command. If it's complete ok else you > will say me what I must post. You must provide the actual lines that splint is complaining about. Note that the preprocessor operator # - may only appear in a macro - may only be followed by the name of a macro argument, not by any other token.