Re: [splint-discuss] Newbie question

2003-07-31 Thread Richard A. O'Keefe
I use to use the following memory allocation scheme: #define NEW(t) ((t *)(malloc (sizeof (t Bad idea. As already noted, if you forgot to #include stdlib.h, the cast will prevent the warning message you would normally have got. It's also a bad idea because you have to

Re: [splint-discuss] Parse error: Non-function declaration

2003-10-12 Thread Richard A. O'Keefe
Nayan [EMAIL PROTECTED] wrote: /usr/include/glib-2.0/glib/gtypes.h:43:8: Parse Error: Non-function declaration: G_BEGIN_DECLS : int. (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. It looks as though you are not

Re: [splint-discuss] (void *)

2004-05-04 Thread Richard A. O'Keefe
Winkler Michael \(LVF\) [EMAIL PROTECTED] wrote: Line in Source Code: (void *)pIIC = (void *)strPS.cBuf; Splint detects a parse error with (void *) more precisely, with the first one. Sinister casts have never *ever* been legal C, and they are quite unnecessary.

Re: [splint-discuss] Execution Question.

2004-09-27 Thread Richard A. O'Keefe
Noah Silverman [EMAIL PROTECTED] wrote: I want to use [splint] to analyze some code written by a former employee. His code has some weird inclusions at the top. ... #include set #include map #include deque #include vector #include