From bherwig at gmx.com Wed Jun 3 14:42:28 2009 From: bherwig at gmx.com (Benjamin Herwig) Date: Wed, 03 Jun 2009 20:42:28 +0200 Subject: [splint-discuss] imp-type - Implicit type not recognized(?) Message-ID: <4A26C414.9070006@gmx.com> Hello list! I just splinted the following code using splint 3.1.2: int main(void) { static a; a = 123; return a; } I set the mode-selector to standard and tried + and - imp-type. So the cmd-line looked this way: $splint -standard -imp-type code.c (And I also tried $splint -standard +imp-type Listing_8-2.c ... but that's redundant.) Why doesn't splint complain about a's implicit int-type? I would be very glad if you could tell me more or hint me to any fault. Did I set the imptype-flag the wrong way? Thanks a lot in advance! Yours Benjamin -- Benjamin Herwig Tel.: 0561 - 703 400 40 Naumburger Str. 13 Mobil: 0175 - 762 38 44 34127 Kassel PGP: ABCDD3DD -+-+-+-+ http://www.benjamin-herwig.de +-+-+-+- -+-+-+-+ http://www.sg-kassel.gi-ev.de +-+-+-+- From Boris.Hollas at de.bosch.com Thu Jun 4 08:04:41 2009 From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1)) Date: Thu, 4 Jun 2009 14:04:41 +0200 Subject: [splint-discuss] Buffer checking and loops Message-ID: Hello, I've done some experiments to find out more about how buffer checking and the loop heuristics work. There are some things I don't fully understand yet. These are the observations I made and the questions I have about them: - Splint reports a spurious out-of-bounds read in foo in the code below: t2.c:18:3: Possible out-of-bounds read: foo(a) Unable to resolve constraint: requires maxRead(a @ t2.c:18:7) >= 2 needed to satisfy precondition: requires maxRead(a @ t2.c:18:7) >= 2 derived from foo precondition: requires maxRead() >= 2 However, I don't understand why this happens. From my understanding, a postcondition maxRead(a) = 2 Is generated from the int a[3] declaration in main. Is this not checked between functions? How are function calls treated, are they replaced by their pre- and postconditions? - On the other hand, splint reports "Passed storage a not completely defined (*a is undefined)" if I replace the for loop by an equivalent while loop: i=0; while(i<3) { a[i] = i; i++; } Are for and while loops treated differently or are for loops just easier to analyze for splint? - Splint does not detect that a[2] is undefined if I change the loop bound to for(i=0; i<1; i++) Does that mean that splint sets array a[] to "defined" here? - While splint reports an out-of-bounds read for for(i=0; i<5; i++) It does not for for(i=-10; i<2; i++) Is the lower bound not checked for arrays? Best regards, Boris -------------------------------------- void foo(/*@in@*/int *a) /*@requires maxRead(a) >= 2@*/ { int i; i = a[2]; } int main() { int a[3]; int i; for(i=0; i<3; i++) a[i] = i; foo(a); return 0; } From D.Jansen at cs.ru.nl Thu Jun 4 08:29:46 2009 From: D.Jansen at cs.ru.nl (David N. Jansen) Date: Thu, 4 Jun 2009 14:29:46 +0200 Subject: [splint-discuss] Buffer checking and loops In-Reply-To: References: Message-ID: Op 4-jun-2009, om 14:04 heeft Hollas Boris (CR/AEY1) het volgende geschreven: > - On the other hand, splint reports "Passed storage a not > completely defined (*a is undefined)" if I replace the for loop by > an equivalent while loop: > i=0; > while(i<3) { > a[i] = i; > i++; > } > > Are for and while loops treated differently or are for loops just > easier to analyze for splint? I had similar problems with while loops that I knew would be executed at least once; however, splint still seemed to think that they could be executed 0 times. The report disappeared when I replaced the while loop by a do ... while loop. (In one or two cases, I also found differences in splint reports between a for and an equivalent while loop, but I can't remember exactly where and how.) David N. Jansen, Radboud Universiteit Nijmegen From freewill1729 at gmail.com Sat Jun 20 21:38:43 2009 From: freewill1729 at gmail.com (vivek kumar) Date: Sun, 21 Jun 2009 10:08:43 +0530 Subject: [splint-discuss] parse error in non-conventional C programming style Message-ID: <1e7d305c0906202138k7bd74a99oa0f4a35ca0215fbe@mail.gmail.com> Hi I came across some code which is in the following style //file1.c #include #include #include void print(void){ //use some gdk functions like gdk_pixmap_new() //or use some varibales like gint, gboolean etc printf("Hello world\n"); } //main.c #include #include "file1.c" int main(int argc, char *argv[]){ print(); return EXIT_SUCCESS; } The code has *.c files included rather than *.h files i.e. the code has not been separated into declaration part(*.h) and definition part(*.c), cleanly. When I use splint on such code I get parse errors when gdk constructs are used. How can I force splint to check the gtk and gdk headers file in this style of programming. I would be deeply thankful for some suggestions. -- Thanking You Sincerely Vivek Kumar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20090621/d5432f71/attachment.html From jandcmoore at gmail.com Sat Jun 20 23:19:24 2009 From: jandcmoore at gmail.com (Jonathan and Caroline Moore) Date: Sun, 21 Jun 2009 07:19:24 +0100 Subject: [splint-discuss] parse error in non-conventional C programming style In-Reply-To: <1e7d305c0906202138k7bd74a99oa0f4a35ca0215fbe@mail.gmail.com> References: <1e7d305c0906202138k7bd74a99oa0f4a35ca0215fbe@mail.gmail.com> Message-ID: <8bf7d05b0906202319n38b42ca9ibbb607d8578a9063@mail.gmail.com> Add file1.c to the splint command line. Jonathan 2009/6/21 vivek kumar : > Hi > > I came across some code which is in the following style > > //file1.c > #include > #include > #include > > void print(void){ > > //use some gdk functions like gdk_pixmap_new() > //or use some varibales like gint, gboolean etc > > ?printf("Hello world\n"); > > } > > //main.c > > #include > #include "file1.c" > > int main(int argc, char *argv[]){ > > ?print(); > > ?return EXIT_SUCCESS; > } > > The code has *.c files included rather than *.h files i.e. the code has not > been separated into declaration part(*.h) and definition part(*.c), cleanly. > When I use splint on such code I get parse errors when gdk constructs are > used. > How can I force splint to check the gtk and gdk headers file in this style > of programming. > > I would be deeply thankful for some suggestions. > > > -- > Thanking You > Sincerely > Vivek Kumar > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > > -- Jonathan (and Caroline) Jonathan and Caroline Moore JandCMoore at gmail.com (Jonathan) CandJMoore at gmail.com (Caroline) http://jandcmoore.googlepages.com/ From freewill1729 at gmail.com Sun Jun 21 04:55:06 2009 From: freewill1729 at gmail.com (vivek kumar) Date: Sun, 21 Jun 2009 17:25:06 +0530 Subject: [splint-discuss] parse error in non-conventional C programming style In-Reply-To: <1e7d305c0906202138k7bd74a99oa0f4a35ca0215fbe@mail.gmail.com> References: <1e7d305c0906202138k7bd74a99oa0f4a35ca0215fbe@mail.gmail.com> Message-ID: <1e7d305c0906210455i50858f23i9e9156a74374170d@mail.gmail.com> I have included files like file1.c. But how do I force splint to check gtk, gdk header files, which supposedly is giving rise to parse errors. Hi I came across some code which is in the following style //file1.c #include #include #include void print(void){ //use some gdk functions like gdk_pixmap_new() //or use some varibales like gint, gboolean etc printf("Hello world\n"); } //main.c #include #include "file1.c" int main(int argc, char *argv[]){ print(); return EXIT_SUCCESS; } The code has *.c files included rather than *.h files i.e. the code has not been separated into declaration part(*.h) and definition part(*.c), cleanly. When I use splint on such code I get parse errors when gdk constructs are used. How can I force splint to check the gtk and gdk headers file in this style of programming. I would be deeply thankful for some suggestions. -- Thanking You Sincerely Vivek Kumar -- Thanking You Sincerely Vivek Kumar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20090621/586d20ad/attachment.html From jandcmoore at gmail.com Sun Jun 21 08:53:48 2009 From: jandcmoore at gmail.com (Jonathan and Caroline Moore) Date: Sun, 21 Jun 2009 16:53:48 +0100 Subject: [splint-discuss] parse error in non-conventional C programming style In-Reply-To: <1e7d305c0906210455i50858f23i9e9156a74374170d@mail.gmail.com> References: <1e7d305c0906202138k7bd74a99oa0f4a35ca0215fbe@mail.gmail.com> <1e7d305c0906210455i50858f23i9e9156a74374170d@mail.gmail.com> Message-ID: <8bf7d05b0906210853p7476ff28ve6e5950ee0bc33cb@mail.gmail.com> Have you checked section 14.3? http://lclint.cs.virginia.edu/manual/html/sec14.html 2009/6/21 vivek kumar : > I have included files like file1.c. But how do I force splint to check gtk, > gdk header files, which supposedly is giving rise to parse errors. > > Hi > > I came across some code which is in the following style > > //file1.c > #include > #include > #include > > void print(void){ > > //use some gdk functions like gdk_pixmap_new() > //or use some varibales like gint, gboolean etc > > ?printf("Hello world\n"); > > } > > //main.c > > #include > #include "file1.c" > > int main(int argc, char *argv[]){ > > ?print(); > > ?return EXIT_SUCCESS; > } > > The code has *.c files included rather than *.h files i.e. the code has not > been separated into declaration part(*.h) and definition part(*.c), cleanly. > When I use splint on such code I get parse errors when gdk constructs are > used. > How can I force splint to check the gtk and gdk headers file in this style > of programming. > > I would be deeply thankful for some suggestions. > > > -- > Thanking You > Sincerely > Vivek Kumar > > > > -- > Thanking You > Sincerely > Vivek Kumar > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > > -- Jonathan (and Caroline) Jonathan and Caroline Moore JandCMoore at gmail.com (Jonathan) CandJMoore at gmail.com (Caroline) http://jandcmoore.googlepages.com/ From mehmet.ekici at ttmail.com Mon Jun 22 04:12:30 2009 From: mehmet.ekici at ttmail.com (Mehmet Ali Ekici) Date: Mon, 22 Jun 2009 14:12:30 +0300 Subject: [splint-discuss] cross-referencing tool Message-ID: <000001c9f32a$58e26da0$0aa748e0$@ekici@ttmail.com> Hi, I wonder if there is an GUI or a tool that integrated splint such that when error line in output of splint clicked it opens the source code In the editor and mark the corresponding line. Thanks. Mehmet From lholzheid at bihl-wiedemann.de Mon Jun 22 04:29:26 2009 From: lholzheid at bihl-wiedemann.de (Ludolf Holzheid) Date: Mon, 22 Jun 2009 13:29:26 +0200 Subject: [splint-discuss] cross-referencing tool Message-ID: <20090622112926.GA18861@svr5.bihl-wiedemann.de> On Mon, 2009-06-22 14:12:30 +0300, Mehmet Ali Ekici wrote: > Hi, > I wonder if there is an GUI or a tool that integrated splint such that when > error line in output of splint clicked it opens the source code > In the editor and mark the corresponding line. Splint as a command line tool can be easily integrated into various build systems (Emacs, Eclipse or even VisualStudio come mind). For that reason, the format of splint's messages can be configured. See section "Message Format" in appendix B "Flags" in the manual. There is no need for a special tool. Ludolf -- --------------------------------------------------------------- Ludolf Holzheid Tel: +49 621 339960 Bihl+Wiedemann GmbH Fax: +49 621 3392239 Flo?w?rthstra?e 41 e-mail: lholzheid at bihl-wiedemann.de D-68199 Mannheim, Germany --------------------------------------------------------------- From jandcmoore at gmail.com Mon Jun 22 08:56:34 2009 From: jandcmoore at gmail.com (Jonathan and Caroline Moore) Date: Mon, 22 Jun 2009 16:56:34 +0100 Subject: [splint-discuss] cross-referencing tool In-Reply-To: <3152854651256210850@unknownmsgid> References: <3152854651256210850@unknownmsgid> Message-ID: <8bf7d05b0906220856k2e6954caw6215de22da984639@mail.gmail.com> Works for me out of the box with eclipse. 2009/6/22 Mehmet Ali Ekici : > Hi, > I wonder if there is an GUI or a tool that integrated splint such that when > error line in output of splint clicked it opens the source code > In the editor and mark the corresponding line. > > Thanks. > Mehmet > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > -- Jonathan (and Caroline) Jonathan and Caroline Moore JandCMoore at gmail.com (Jonathan) CandJMoore at gmail.com (Caroline) http://jandcmoore.googlepages.com/ From mehmet.ekici at ttmail.com Wed Jun 24 06:41:58 2009 From: mehmet.ekici at ttmail.com (Mehmet Ali Ekici) Date: Wed, 24 Jun 2009 16:41:58 +0300 Subject: [splint-discuss] cross-referencing tool In-Reply-To: <20090622112926.GA18861@svr5.bihl-wiedemann.de> References: <20090622112926.GA18861@svr5.bihl-wiedemann.de> Message-ID: <001e01c9f4d1$8f433b60$adc9b220$@ekici@ttmail.com> Hi, How splint run against a code in eclipse? I loaded eclipse CDT and splint for windows and mingw. But I can't see how I can run splint on a list of files. I tried it as external tool but it doesn't help locating the errorneous source code. Regards, -----Original Message----- From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Ludolf Holzheid Sent: Monday, June 22, 2009 2:29 PM To: splint-discuss at mail.cs.virginia.edu Subject: Re: [splint-discuss] cross-referencing tool On Mon, 2009-06-22 14:12:30 +0300, Mehmet Ali Ekici wrote: > Hi, > I wonder if there is an GUI or a tool that integrated splint such that when > error line in output of splint clicked it opens the source code > In the editor and mark the corresponding line. Splint as a command line tool can be easily integrated into various build systems (Emacs, Eclipse or even VisualStudio come mind). For that reason, the format of splint's messages can be configured. See section "Message Format" in appendix B "Flags" in the manual. There is no need for a special tool. Ludolf -- --------------------------------------------------------------- Ludolf Holzheid Tel: +49 621 339960 Bihl+Wiedemann GmbH Fax: +49 621 3392239 Flo?w?rthstra?e 41 e-mail: lholzheid at bihl-wiedemann.de D-68199 Mannheim, Germany --------------------------------------------------------------- _______________________________________________ splint-discuss mailing list splint-discuss at mail.cs.virginia.edu http://www.cs.virginia.edu/mailman/listinfo/splint-discuss From mehmet.ekici at ttmail.com Wed Jun 24 06:41:58 2009 From: mehmet.ekici at ttmail.com (Mehmet Ali Ekici) Date: Wed, 24 Jun 2009 16:41:58 +0300 Subject: [splint-discuss] cross-referencing tool In-Reply-To: <20090622112926.GA18861@svr5.bihl-wiedemann.de> References: <20090622112926.GA18861@svr5.bihl-wiedemann.de> Message-ID: <001e01c9f4d1$8f433b60$adc9b220$@ekici@ttmail.com> Hi, How splint run against a code in eclipse? I loaded eclipse CDT and splint for windows and mingw. But I can't see how I can run splint on a list of files. I tried it as external tool but it doesn't help locating the errorneous source code. Regards, -----Original Message----- From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Ludolf Holzheid Sent: Monday, June 22, 2009 2:29 PM To: splint-discuss at mail.cs.virginia.edu Subject: Re: [splint-discuss] cross-referencing tool On Mon, 2009-06-22 14:12:30 +0300, Mehmet Ali Ekici wrote: > Hi, > I wonder if there is an GUI or a tool that integrated splint such that when > error line in output of splint clicked it opens the source code > In the editor and mark the corresponding line. Splint as a command line tool can be easily integrated into various build systems (Emacs, Eclipse or even VisualStudio come mind). For that reason, the format of splint's messages can be configured. See section "Message Format" in appendix B "Flags" in the manual. There is no need for a special tool. Ludolf -- --------------------------------------------------------------- Ludolf Holzheid Tel: +49 621 339960 Bihl+Wiedemann GmbH Fax: +49 621 3392239 Flo?w?rthstra?e 41 e-mail: lholzheid at bihl-wiedemann.de D-68199 Mannheim, Germany --------------------------------------------------------------- _______________________________________________ splint-discuss mailing list splint-discuss at mail.cs.virginia.edu http://www.cs.virginia.edu/mailman/listinfo/splint-discuss From jandcmoore at gmail.com Wed Jun 24 07:08:47 2009 From: jandcmoore at gmail.com (Jonathan and Caroline Moore) Date: Wed, 24 Jun 2009 15:08:47 +0100 Subject: [splint-discuss] cross-referencing tool In-Reply-To: <6717956014651824236@unknownmsgid> References: <20090622112926.GA18861@svr5.bihl-wiedemann.de> <6717956014651824236@unknownmsgid> Message-ID: <8bf7d05b0906240708n78f2faf8jd30f15198fe4b2c1@mail.gmail.com> As splint to your all: target in the Makefile 2009/6/24 Mehmet Ali Ekici > Hi, > How splint run against a code in eclipse? I loaded eclipse CDT and splint > for windows and mingw. But I can't see how I can run splint on a list of > files. > I tried it as external tool but it doesn't help locating the errorneous > source code. > > Regards, > > > -----Original Message----- > From: splint-discuss-bounces at cs.virginia.edu > [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Ludolf > Holzheid > Sent: Monday, June 22, 2009 2:29 PM > To: splint-discuss at mail.cs.virginia.edu > Subject: Re: [splint-discuss] cross-referencing tool > > On Mon, 2009-06-22 14:12:30 +0300, Mehmet Ali Ekici wrote: > > Hi, > > I wonder if there is an GUI or a tool that integrated splint such that > when > > error line in output of splint clicked it opens the source code > > In the editor and mark the corresponding line. > > Splint as a command line tool can be easily integrated into various > build systems (Emacs, Eclipse or even VisualStudio come mind). For > that reason, the format of splint's messages can be configured. See > section "Message Format" in appendix B "Flags" in the manual. > > There is no need for a special tool. > > Ludolf > > -- > > --------------------------------------------------------------- > Ludolf Holzheid Tel: +49 621 339960 > Bihl+Wiedemann GmbH Fax: +49 621 3392239 > Flo?w?rthstra?e 41 e-mail: lholzheid at bihl-wiedemann.de > D-68199 Mannheim, Germany > --------------------------------------------------------------- > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > > > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > -- Jonathan (and Caroline) Jonathan and Caroline Moore JandCMoore at gmail.com (Jonathan) CandJMoore at gmail.com (Caroline) http://jandcmoore.googlepages.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20090624/cd17878f/attachment.html From mehmet.ekici at ttmail.com Mon Jun 29 08:25:14 2009 From: mehmet.ekici at ttmail.com (Mehmet Ali Ekici) Date: Mon, 29 Jun 2009 18:25:14 +0300 Subject: [splint-discuss] cross-referencing tool In-Reply-To: <8bf7d05b0906240708n78f2faf8jd30f15198fe4b2c1@mail.gmail.com> References: <20090622112926.GA18861@svr5.bihl-wiedemann.de> <6717956014651824236@unknownmsgid> <8bf7d05b0906240708n78f2faf8jd30f15198fe4b2c1@mail.gmail.com> Message-ID: <000101c9f8cd$cfed2860$6fc77920$@ekici@ttmail.com> Hi Jonathan, Sorry for disturbing you but I could not get it run. Would you please send me an example makefile ? I found only splint reference in eclipse Window->preferences dialog. Even I did it when I click on the output of the splint it does not locate. Thanks in advance. Mehmet From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Jonathan and Caroline Moore Sent: Wednesday, June 24, 2009 5:09 PM To: Discussions about the Splint annotation-assisted static analysis project Subject: Re: [splint-discuss] cross-referencing tool As splint to your all: target in the Makefile 2009/6/24 Mehmet Ali Ekici Hi, How splint run against a code in eclipse? I loaded eclipse CDT and splint for windows and mingw. But I can't see how I can run splint on a list of files. I tried it as external tool but it doesn't help locating the errorneous source code. Regards, -----Original Message----- From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Ludolf Holzheid Sent: Monday, June 22, 2009 2:29 PM To: splint-discuss at mail.cs.virginia.edu Subject: Re: [splint-discuss] cross-referencing tool On Mon, 2009-06-22 14:12:30 +0300, Mehmet Ali Ekici wrote: > Hi, > I wonder if there is an GUI or a tool that integrated splint such that when > error line in output of splint clicked it opens the source code > In the editor and mark the corresponding line. Splint as a command line tool can be easily integrated into various build systems (Emacs, Eclipse or even VisualStudio come mind). For that reason, the format of splint's messages can be configured. See section "Message Format" in appendix B "Flags" in the manual. There is no need for a special tool. Ludolf -- --------------------------------------------------------------- Ludolf Holzheid Tel: +49 621 339960 Bihl+Wiedemann GmbH Fax: +49 621 3392239 Flo?w?rthstra?e 41 e-mail: lholzheid at bihl-wiedemann.de D-68199 Mannheim, Germany --------------------------------------------------------------- _______________________________________________ splint-discuss mailing list splint-discuss at mail.cs.virginia.edu http://www.cs.virginia.edu/mailman/listinfo/splint-discuss _______________________________________________ splint-discuss mailing list splint-discuss at mail.cs.virginia.edu http://www.cs.virginia.edu/mailman/listinfo/splint-discuss -- Jonathan (and Caroline) Jonathan and Caroline Moore JandCMoore at gmail.com (Jonathan) CandJMoore at gmail.com (Caroline) http://jandcmoore.googlepages.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20090629/02b7d496/attachment.html From jandcmoore at gmail.com Mon Jun 29 14:15:56 2009 From: jandcmoore at gmail.com (Jonathan and Caroline Moore) Date: Mon, 29 Jun 2009 22:15:56 +0100 Subject: [splint-discuss] cross-referencing tool In-Reply-To: <-2075817506560606334@unknownmsgid> References: <20090622112926.GA18861@svr5.bihl-wiedemann.de> <6717956014651824236@unknownmsgid> <8bf7d05b0906240708n78f2faf8jd30f15198fe4b2c1@mail.gmail.com> <-2075817506560606334@unknownmsgid> Message-ID: <8bf7d05b0906291415k8900fc8ld64a35e83d8d2187@mail.gmail.com> Add something like this to your makefile split: splint Then add the target split as a dependency to all: You might need to experiment with the executable name on windows type splint.exe or full path to splint.exe If you are still stuck send me your Makefile and I'll see if I can spot anything wrong. I don't run eclipse on Windows. Jonathan 2009/6/29 Mehmet Ali Ekici : > Hi Jonathan, > > Sorry for disturbing you but I could not get it run. Would you please send > me an example makefile ? > > I found only splint reference in eclipse Window->preferences dialog. > > > > Even I did it when I click on the output of the splint it does not locate. > > > > Thanks in advance. > > Mehmet > > > > From: splint-discuss-bounces at cs.virginia.edu > [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Jonathan and > Caroline Moore > Sent: Wednesday, June 24, 2009 5:09 PM > To: Discussions about the Splint annotation-assisted static analysis project > Subject: Re: [splint-discuss] cross-referencing tool > > > > As splint to your all: target in the Makefile > > 2009/6/24 Mehmet Ali Ekici > > Hi, > How splint run against a code in eclipse? I loaded eclipse CDT and splint > for windows and mingw. But I can't see how I can run splint on a list of > files. > I tried it as external tool but it doesn't help locating the errorneous > source code. > > Regards, > > > -----Original Message----- > From: splint-discuss-bounces at cs.virginia.edu > [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Ludolf Holzheid > Sent: Monday, June 22, 2009 2:29 PM > To: splint-discuss at mail.cs.virginia.edu > Subject: Re: [splint-discuss] cross-referencing tool > > On Mon, 2009-06-22 14:12:30 +0300, Mehmet Ali Ekici wrote: >> Hi, >> I wonder if there is an GUI or a tool that integrated splint such that > when >> error line in output of splint clicked it opens the source code >> In the editor and mark the corresponding line. > > Splint as a command line tool can be easily integrated into various > build systems (Emacs, Eclipse or even VisualStudio come mind). For > that reason, the format of splint's messages can be configured. See > section "Message Format" in appendix B "Flags" in the manual. > > There is no need for a special tool. > > Ludolf > > -- > > --------------------------------------------------------------- > Ludolf Holzheid ? ? ? ? ? ? Tel: ? ?+49 621 339960 > Bihl+Wiedemann GmbH ? ? ? ? Fax: ? ?+49 621 3392239 > Flo?w?rthstra?e 41 ? ? ? ? ?e-mail: lholzheid at bihl-wiedemann.de > D-68199 Mannheim, Germany > --------------------------------------------------------------- > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > > > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > > > -- > Jonathan (and Caroline) > > Jonathan and Caroline Moore > JandCMoore at gmail.com (Jonathan) > CandJMoore at gmail.com (Caroline) > http://jandcmoore.googlepages.com/ > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > > -- Jonathan (and Caroline) Jonathan and Caroline Moore JandCMoore at gmail.com (Jonathan) CandJMoore at gmail.com (Caroline) http://jandcmoore.googlepages.com/ From Wenzel at bbr-vt.de Tue Jun 30 23:50:38 2009 From: Wenzel at bbr-vt.de (Wenzel, Bodo) Date: Wed, 1 Jul 2009 08:50:38 +0200 Subject: [splint-discuss] cross-referencing tool Message-ID: <46B6459B655D7342AB97371E8B7CD8B874ED15@sv-exch.BBR.local> Hi Mehmet, > Would you please send me an example makefile ? Well, I can't send you a complete Makefile because it'll hide the important parts. Here is an excerpt of a working example: --- 8>< snip ----------------------------------------- LD = avr-gcc LDFLAGS = -mmcu=at90usb1287 -Wall -Wextra -Werror -Wl,-u,vfprintf -Wl,-u,vfscanf LIBS = -lprintf_flt -lscanf_flt -lm LINT = splint LINTFLAGS = +quiet +checks +top-use -paren-file-format -preproc \ +slash-slash-comment +all-macros +all-block MODULES = adc [...parts left out...] main [...parts left out...] watchdog OBJECTS = $(MODULES:%=%.o) SOURCES = $(MODULES:%=%.c) application.elf: $(OBJECTS) $(LD) $(LDFLAGS) $^ $(LIBS) -Wl,-Map=$(@:%.elf=%.map) -o $@ $(LINT) $(LINTFLAGS) $(SOURCES) --- snap ><8 ----------------------------------------- This is for an application running on an AVR, compiled and linked by WinAVR on Win2K. I'm using Eclipse as an IDE, but I can use the DOS shell as well to run Make. Some notes: - All modules are compiled separately, as usual. At that time there are no Splint calls. This is not shown because you should know how to do this. - The linker runs _before_ Splint to make sure that the application is correct. (As far as GCC can say; but GCC is strong!) If the link stage fails, Make aborts the build and Splint will not even be run. - The option "-paren-file-format" makes Splint's messages detectable by Eclipse. - The option "-preproc" disables warnings about missing system header files. - You don't need to list the application's header files because Splint will read them through the #include "..." directive. Of course Splint needs to be installed so that it can be run right from the command line. Here is an excerpt of my environment variables: --- 8>< snip ----------------------------------------- LARCH_PATH=C:\Programme\Tools\splint-3.1.1\lib;. Path=[...cut...];C:\Programme\Tools[...cut...];D:\WinAVR\bin --- snap ><8 ----------------------------------------- Splint's executable file "splint.exe" is copied into the directory "C:\Programme\Tools", but all other files are in the directory "C:\Programme\Tools\splint-3.1.1" to keep things simple. HTH, Bodo Mit freundlichen Gr??en i. A. Bodo Wenzel - Entwicklung Software - -- BBR - Baudis Bergmann R?sch Verkehrstechnik GmbH Pillaustra?e 1e D - 38126 Braunschweig T: +49.531.27300-766 F: +49.531.27300-999 @: wenzel at bbr-vt.de W: http://www.bbr-vt.de Registergericht: AG Braunschweig HRB 3037 Gesch?ftsf?hrer: Dipl.-Ing. Arne Baudis Dipl.-Ing. Thomas Bergmann Dipl.-Ing. Frank-Michael R?sch USt.-ID-Nr.: DE 114 877 881