From trogers at oceprinting.com Tue Jun 3 11:12:45 2003 From: trogers at oceprinting.com (Rogers, Thomas) Date: Wed Mar 22 17:10:08 2006 Subject: [splint-discuss] Hexadecimal constants Message-ID: <1091D1207C5B884088EE8B7A2492D970586345@brsmtp01.oceprinting.com> Since I am new to Splint, I am curious about a message that I'm seeing. The system header files contain #define MY_CONSTANT 0x00100000L When I use this symbolic constant in a function call that expects an unsigned long argument, splint produces a message. My first question is: shouldn't Splint always consider a hexadecimal constant as "unsigned" even if not explicitly declared? I suppose #define MY_CONSTANT 0x00100000UL would eliminate the message (but it's in a system header file, and may have other repercussions). My second question is: How do I get Splint to stop generating the message without altering the system file? From evans at cs.virginia.edu Thu Jun 5 10:52:54 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Re: Questions and suggestions on using lclint In-Reply-To: References: Message-ID: They are identical. Its a flaw in the documentation to list both versions. Sorry for the confusion, --- Dave On Thu, 5 Jun 2003 Marco.Giromini@marconiselenia.com wrote: > Is there any difference between the two following flags (reported in > Appendix B) ? > imp-outs Allow unannotated pointer parameters to functions to be > implicit out parameters. > impouts Pointer parameters to unspecified functions may be > implicit out parameters. > If there is any difference, this contradicts the following note: > "To make flag names more readable, hyphens (-), underscores (_) and spaces > in flags at the command line are ignored." > > Thank you > Marco Giromini > > > From j.schmidt at baumueller-kamenz.de Thu Jun 12 03:26:41 2003 From: j.schmidt at baumueller-kamenz.de (Jan Schmidt) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Question for Configuration Message-ID: Hello, sorry if I ask a trivial question, but I dit not found the answer in the manual. IŽll use splint to check code for a signal-processor (ti 28xx). How can I configure splint so that ioport, cregister are reseved words (like volatile) sizeof(int) == sizeof(char) == sizeof(short) == 1 sizeof(long) == 2 char has 16 bits long has 32 bits pointers, double are long (32 bits) thanks j. schmidt From cbfalconer at yahoo.com Thu Jun 12 07:04:23 2003 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Failure of mailing-list References: Message-ID: <3EE85E37.322799D0@yahoo.com> In general, no replies to interesting questions are seen on this list, because such replies tend to get sent to the originator ONLY. This is due to the lack of a reply-to field in the list distribution. This makes this list virtually useless. I appreciate that some few users may not want this, so it should be possible to opt-out. The list at gpc@gnu.de is capable of this, if you have any problem with it. I do not know what specific software you might need. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From SidPrice at softtools.com Thu Jun 12 10:54:52 2003 From: SidPrice at softtools.com (Sid Price) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Failure of mailing-list In-Reply-To: <3EE85E37.322799D0@yahoo.com> Message-ID: <001501c330f2$984ae590$0400a8c0@sjdell> So does this mean you are moving the list? Will we need to resubscribe? Please clarify. Thanks Sid -----Original Message----- From: splint-discuss-admin@cs.virginia.edu [mailto:splint-discuss-admin@cs.virginia.edu] On Behalf Of CBFalconer Sent: Thursday, June 12, 2003 5:04 AM To: splint-discuss@cs.virginia.edu Subject: [splint-discuss] Failure of mailing-list In general, no replies to interesting questions are seen on this list, because such replies tend to get sent to the originator ONLY. This is due to the lack of a reply-to field in the list distribution. This makes this list virtually useless. I appreciate that some few users may not want this, so it should be possible to opt-out. The list at gpc@gnu.de is capable of this, if you have any problem with it. I do not know what specific software you might need. -- 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 evans at cs.virginia.edu Thu Jun 12 11:09:05 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Failure of mailing-list In-Reply-To: <001501c330f2$984ae590$0400a8c0@sjdell> References: <001501c330f2$984ae590$0400a8c0@sjdell> Message-ID: No, the list isn't moving. But, I have changed the settings so the default reply is now to the list, not just to the poster. So, if you reply to a posting the default will now be to send the response to everyone. If you want to just reply to the poster, be sure to edit the to address. --- Dave On Thu, 12 Jun 2003, Sid Price wrote: > So does this mean you are moving the list? > > Will we need to resubscribe? > > Please clarify. > > Thanks > Sid > > > -----Original Message----- > From: splint-discuss-admin@cs.virginia.edu > [mailto:splint-discuss-admin@cs.virginia.edu] On Behalf Of CBFalconer > Sent: Thursday, June 12, 2003 5:04 AM > To: splint-discuss@cs.virginia.edu > Subject: [splint-discuss] Failure of mailing-list > > > In general, no replies to interesting questions are seen on this list, > because such replies tend to get sent to the originator ONLY. This is > due to the lack of a reply-to field in the list distribution. This > makes this list virtually useless. > > I appreciate that some few users may not want this, so it should be > possible to opt-out. The list at gpc@gnu.de is capable of this, if you > have any problem with it. I do not know what specific software you > might need. > > -- > 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 > From evans at cs.virginia.edu Thu Jun 12 11:13:19 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Question for Configuration In-Reply-To: References: Message-ID: > IŽll use splint to check code for a signal-processor (ti 28xx). How can I > configure splint so that > > ioport, cregister are reseved words (like volatile) > If its okay for them to just be ignored, you can use -Dioport= etc., to hide them from the parser. You can put these defined in your .splintrc file. > sizeof(int) == sizeof(char) == sizeof(short) == 1 > sizeof(long) == 2 > > char has 16 bits > long has 32 bits > > pointers, double are long (32 bits) > You can use the +charint to make char and int interchangable, and similarly +shortint to make short and int interchangable. --- Dave > thanks > > j. schmidt > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > From cbfalconer at yahoo.com Thu Jun 12 12:10:25 2003 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Failure of mailing-list References: <001501c330f2$984ae590$0400a8c0@sjdell> Message-ID: <3EE8A5F1.60B64A@yahoo.com> *** top posting fixed *** David Evans wrote: > On Thu, 12 Jun 2003, Sid Price wrote: > > cbfalconer wrote: > > > > In general, no replies to interesting questions are seen on this > > list, because such replies tend to get sent to the originator > > ONLY. This is due to the lack of a reply-to field in the list > > distribution. This makes this list virtually useless. > > > > I appreciate that some few users may not want this, so it should > > be possible to opt-out. The list at gpc@gnu.de is capable of > > this, if you have any problem with it. I do not know what > > specific software you might need. > > > So does this mean you are moving the list? > > > > Will we need to resubscribe? > > > > Please clarify. > > No, the list isn't moving. But, I have changed the settings so > the default reply is now to the list, not just to the poster. > > So, if you reply to a posting the default will now be to send > the response to everyone. If you want to just reply to the > poster, be sure to edit the to address. That helps minisculely, but results in any replies to my postings being delivered to me twice. Why don't you want to use the reply-to field? -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From Simon.Hosie at connexionz.co.nz Thu Jun 12 18:21:39 2003 From: Simon.Hosie at connexionz.co.nz (Simon Hosie) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Failure of mailing-list Message-ID: CBFalconer: > That helps minisculely, but results in any replies to my postings > being delivered to me twice. Why don't you want to use the > reply-to field? Unless Outlook is lying to me (and I'm sure it would), the setting seems to be correct. You should notice when you hit reply. I see: Reply-To: splint-discuss@something.edu X-Reply-To: cbfalconer@something.net With appropriate values of 'something' -- I don't know what level of spam protection any archines of this list have, and I don't want to degrade it for anyone. From cbfalconer at yahoo.com Thu Jun 12 20:21:49 2003 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Failure of mailing-list References: Message-ID: <3EE9191D.D9DEFB9F@yahoo.com> Simon Hosie wrote: > CBFalconer: > > > That helps minisculely, but results in any replies to my postings > > being delivered to me twice. Why don't you want to use the > > reply-to field? > > Unless Outlook is lying to me (and I'm sure it would), the setting > seems to be correct. You should notice when you hit reply. I see: > > Reply-To: splint-discuss@something.edu > X-Reply-To: cbfalconer@something.net > > With appropriate values of 'something' -- I don't know what level > of spam protection any archines of this list have, and I don't > want to degrade it for anyone. I do now, for the first time in this group. That's just fine. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From j.schmidt at baumueller-kamenz.de Fri Jun 13 05:51:19 2003 From: j.schmidt at baumueller-kamenz.de (Jan Schmidt) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Question for Configuration In-Reply-To: Message-ID: On 12-Jun-03 David Evans wrote: > >> IŽll use splint to check code for a signal-processor (ti 28xx). How can I >> configure splint so that >> >> ioport, cregister are reseved words (like volatile) >> > > If its okay for them to just be ignored, you can use -Dioport= etc., to > hide them from the parser. You can put these defined in your .splintrc > file. ok, thats also my resolution >> sizeof(int) == sizeof(char) == sizeof(short) == 1 >> sizeof(long) == 2 >> >> char has 16 bits >> long has 32 bits >> >> pointers, double are long (32 bits) >> > > You can use the +charint to make char and int interchangable, and > similarly +shortint to make short and int interchangable. +charint and +shortint are in my .splintrc. But I expect, that the following code-segment should generate a warning like "left shift count >= width of type" (from gcc). splint says: "Finished checking --- no warnings" void testproc (void) { unsigned int DsvCommandMask = 0; DsvCommandMask |= (1 << 20); } j.schmidt From evans at cs.virginia.edu Fri Jun 13 09:17:26 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Question for Configuration In-Reply-To: References: Message-ID: There's no checking for shift constant sizes. Sorry, --- Dave > +charint and +shortint are in my .splintrc. > > But I expect, that the following code-segment should generate a warning like > "left shift count >= width of type" (from gcc). splint says: > > "Finished checking --- no warnings" > > void testproc (void) > { > unsigned int DsvCommandMask = 0; > > DsvCommandMask |= (1 << 20); > } > > j.schmidt > From giva at bgnett.no Mon Jun 16 08:04:49 2003 From: giva at bgnett.no (Gisle Vanem) Date: Wed Mar 22 17:10:09 2006 Subject: [splint-discuss] Checking for un-needed header Message-ID: <02a301c333ff$7ce4eac0$0600000a@broadpark.no> Hi all, During the lifetime of a C/C++ project several header files are added because source snippets are moved between source-files. Seldom are any header files removed. It's to much work to manually walk through each source file and check if a header is no longer needed. So, is SPlint able to to this? I hear Gimpel's PC-Lint can, but $239 is beyond my budget. I was tipped about SPlint at the CodeProject web-site. So I installed SPlint 3.0.1.6 (for Win32), but failed to see any mention of this problem in the manual. Gisle V. # rm /bin/laden /bin/laden: Not found From oscar at st.se Fri Jun 27 02:18:11 2003 From: oscar at st.se (Oscar Abrahamsson) Date: Wed Mar 22 17:10:10 2006 Subject: [splint-discuss] bool unrecognized Message-ID: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> Hello, I'm a beginner to Splint, and I have run into a problem: bool is not recognized as a type. So when I lint a line like bool b; I get Parse Error: Inconsistent function declaration: bool from Splint. This is regardless of whether I specify "-booltype bool" or not. How can I get this working? I'm using Splint 3.0.1.6 for Win32. Thanks in advance, Oscar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.Virginia.EDU/pipermail/splint-discuss/attachments/20030627/4ccfcd05/attachment.htm From roland.illig at gmx.de Fri Jun 27 04:14:10 2003 From: roland.illig at gmx.de (Roland Illig) Date: Wed Mar 22 17:10:10 2006 Subject: [splint-discuss] bool unrecognized In-Reply-To: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> References: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> Message-ID: <20030627081410.GA3650@burse.uni-hamburg.de> On Fri, Jun 27, 2003 at 08:18:11AM +0200, Oscar Abrahamsson wrote: > Hello, > > I'm a beginner to Splint, and I have run into a problem: bool is not recognized as a type. > > So when I lint a line like > > bool b; > > I get > > Parse Error: Inconsistent function declaration: bool > > from Splint. > > This is regardless of whether I specify "-booltype bool" or not. Hello Oscar, the problem is that C does not know a boolean type. You have to declare one and then tell splint to use this type as "the" boolean type. typedef enum { false, true } bool; /*@booltype bool; @*/ /*@booltrue true; @*/ /*@boolfalse false; @*/ Roland From cbfalconer at yahoo.com Fri Jun 27 07:35:29 2003 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:10 2006 Subject: [splint-discuss] bool unrecognized References: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> <20030627081410.GA3650@burse.uni-hamburg.de> Message-ID: <3EFC2C01.2B32E3B4@yahoo.com> Roland Illig wrote: > Oscar Abrahamsson wrote: > > > > I'm a beginner to Splint, and I have run into a problem: bool > > is not recognized as a type. So when I lint a line like > > > > bool b; > > > > I get > > > > Parse Error: Inconsistent function declaration: bool > > > > from Splint. > > > > This is regardless of whether I specify "-booltype bool" or not. > > the problem is that C does not know a boolean type. You have to > declare one and then tell splint to use this type as "the" > boolean type. This is no longer so as of C99. There is a builtin boolean type _Bool, and it also appears as a typedef of bool if you #include . Many systems provide this header now, and if not you can always generate it yourself. My practice is to have the following "stdops.h" available: /* Standard defines of operators, usable on C90 up */ #ifndef stdops_h #define stdops_h #if defined(__STDC__) && (__STDC_VERSION__ >= 199901L) /* The following from C99 - must define for C90 */ #include /* define bool, true, false */ #include /* define not, and, or, xor */ #else #define false 0 #define true 1 typedef int bool; #define not ! #define and && #define or || #define xor ^ #endif #endif and I am not sure how it will affect your following advice. > > typedef enum { false, true } bool; > /*@booltype bool; @*/ > /*@booltrue true; @*/ > /*@boolfalse false; @*/ -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From roland.illig at gmx.de Fri Jun 27 10:54:04 2003 From: roland.illig at gmx.de (Roland Illig) Date: Wed Mar 22 17:10:10 2006 Subject: [splint-discuss] bool unrecognized In-Reply-To: <3EFC2C01.2B32E3B4@yahoo.com> References: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> <20030627081410.GA3650@burse.uni-hamburg.de> <3EFC2C01.2B32E3B4@yahoo.com> Message-ID: <20030627145404.GA4073@burse.uni-hamburg.de> CBFalconer wrote: > Roland Illig wrote: > > the problem is that C does not know a boolean type. You have to > > declare one and then tell splint to use this type as "the" > > boolean type. > > This is no longer so as of C99. There is a builtin boolean type > _Bool, and it also appears as a typedef of bool if you #include > . Many systems provide this header now, and if not you > can always generate it yourself. My practice is to have the > following "stdops.h" available: Well, you're right. I only thought of a boolean type called "bool" or "boolean", not of one with another name or a boolean type included by a header file. Roland From evans at cs.virginia.edu Fri Jun 27 11:18:55 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:10 2006 Subject: [splint-discuss] bool unrecognized In-Reply-To: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> References: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> Message-ID: With splint versions before 3.1, you still need a typedef for bool (even if you use the -booltype bool flag) since bool is not a builtin type. With Splint 3.1 and later, bool is builtin. --- Dave On Fri, 27 Jun 2003, Oscar Abrahamsson wrote: > Hello, > > I'm a beginner to Splint, and I have run into a problem: bool is not recognized as a type. > > So when I lint a line like > > bool b; > > I get > > Parse Error: Inconsistent function declaration: bool > > from Splint. > > This is regardless of whether I specify "-booltype bool" or not. > > How can I get this working? > > I'm using Splint 3.0.1.6 for Win32. > > Thanks in advance, > > Oscar > > > From cbfalconer at yahoo.com Fri Jun 27 12:21:25 2003 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:10 2006 Subject: [splint-discuss] bool unrecognized References: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> Message-ID: <3EFC6F05.4E2AE7E0@yahoo.com> David Evans wrote: > > With splint versions before 3.1, you still need a typedef for > bool (even if you use the -booltype bool flag) since bool is > not a builtin type. With Splint 3.1 and later, bool is builtin. I have 3.0.1.6 here. I have seen no announcements on this list of any later versions. Did I miss something? -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From evans at cs.virginia.edu Fri Jun 27 17:10:11 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:10 2006 Subject: [splint-discuss] bool unrecognized In-Reply-To: <3EFC6F05.4E2AE7E0@yahoo.com> References: <00bc01c33c73$f3da4720$1000a8c0@STESGBG> <3EFC6F05.4E2AE7E0@yahoo.com> Message-ID: Splint 3.1.1 is available from splint.org. It hasn't been announced (to splint-announce list) yet, though, pending production of a Win32 binary. For details of recent changes, see http://www.splint.org/changes.html --- Dave On Fri, 27 Jun 2003, CBFalconer wrote: > David Evans wrote: > > > > With splint versions before 3.1, you still need a typedef for > > bool (even if you use the -booltype bool flag) since bool is > > not a builtin type. With Splint 3.1 and later, bool is builtin. > > I have 3.0.1.6 here. I have seen no announcements on this list of > any later versions. Did I miss something? > > -- > 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 >