Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!cit-vax!cit-vlsi!wen-king From: wen-king@cit-vlsi.Caltech.Edu (Wen-King Su) Newsgroups: comp.unix.questions Subject: Re: Shutting lint up about malloc (missing /*NOSTRICT*/) Message-ID: <2740@cit-vax.Caltech.Edu> Date: Mon, 18-May-87 20:48:02 EDT Article-I.D.: cit-vax.2740 Posted: Mon May 18 20:48:02 1987 Date-Received: Tue, 19-May-87 06:20:10 EDT Sender: news@cit-vax.Caltech.Edu Organization: California Institute of Technology Lines: 63 To: cit-vax!ames!ptsfa!maxepr!cgh!amanue!jr In-Reply-To: <61@amanue.UUCP> Cc: Bcc: In article <61@amanue.UUCP> you write: *>This is driving me nuts. I can't get lint on my system to shut up about *>malloc. *>(1) Did /*NOSTRICT*/ get dropped somewhere? If so, was this a mistake? If *>not, can someone tell me **WHY**?? (2) Absent /*NOSTRICT*/ how the devil *>am I supposed to get lint to shut up about casting the value returned by *>malloc() to a struct *? The cast makes it clear what I mean and *>the man page says I can do it. I do not know about /*NOSTRICT*/, but this is how I get malloc to shut up: #ifdef lint #define malloc(n) MALLOC(n) extern long *MALLOC(); /* use a type with the most strict alignment */ #endif /*lint*/ You may need to define an empty "MALLOC" function to keep lint happy. ============================================================================= You have a strange feeling that your boss is watching you over your shoulder. ---------- ##+.?......| # |..%.%%..| ### |........| # |......?.| ### -----+---- # ################# # ---+- ------------- ``############### |...| |...*.......| %------------# # |.=.| |...*.......+############|..N.......|# -------- #+...| |...........| ##|....././..|# |.....>| ###----- |...`..]....+############+..........|# |......| # |...........| #|.c.@....^.|#######+......+####### |........<..+############|.......d..+# |......| ------------- ------------ -------- Level 10 Hp 44(44) Ac 3 Str 18/37 Exp 9 ============================================================================= You have a strange feeling that your boss is watching you over your shoulder. ---------- ##+.?......| # |..%.%%..| ### |........| # |......?.| ### -----+---- # ################# # ---+- ------------- ``############### |...| |...*.......| %------------# # |.=.| |...*.......+############|..N.......|# -------- #+...| |...........| ##|....././..|# |.....>| ###----- |...`..]....+############+..........|# |......| # |...........| #|.c.@....^.|#######+......+####### |........<..+############|.......d..+# |......| ------------- ------------ -------- Level 10 Hp 44(44) Ac 3 Str 18/37 Exp 9