From owner-freebsd-current Wed Nov 5 14:21:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA13880 for current-outgoing; Wed, 5 Nov 1997 14:21:55 -0800 (PST) (envelope-from owner-freebsd-current) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id OAA13874 for ; Wed, 5 Nov 1997 14:21:48 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id XAA12780 for freebsd-current@FreeBSD.ORG; Wed, 5 Nov 1997 23:21:24 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id XAA17652; Wed, 5 Nov 1997 23:10:06 +0100 (MET) Message-ID: <19971105231006.RB35366@uriah.heep.sax.de> Date: Wed, 5 Nov 1997 23:10:06 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-current@FreeBSD.ORG Subject: Re: LINT Errors References: X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: ; from Simon Shapiro on Nov 4, 1997 01:07:03 -0800 Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Simon Shapiro wrote: > ../../kern/kern_malloc.c: In function `malloc': > ../../kern/kern_malloc.c:136: warning: passing arg 3 of `tsleep' discards > `const' from pointer target type > ../../kern/kern_malloc.c:198: warning: assignment discards `const' from > pointer target type > > [ I admit shamelessly i do not know how t0 silence this one ] By changing the prototype for tsleep(9) to use `const char *' for its third argument. The argument is supposed to be a description, and we do pass constant strings for it all the day. gcc doesn't seem to warn if you pass a string literal (albeit its arranging for the string literal to be in the .text segment). > ../../kern/kern_opt.c:44: warning: #warning "obsolete option GATEWAY - use > `sysctl -w net.inet.ip.forwarding=1'" > > [ Should i do as it says? ] Of course. > ../../i386/i386/sys_machdep.c: In function `i386_get_ioperm': > ../../i386/i386/sys_machdep.c:225: warning: `i' might be used uninitialized > in this function > > [ I routinely initialize these to zero ] ...and thus only hide the actual error. This line state = (iomap[i >> 3] >> (i & 7)) & 1; seems to be superfluous. > > ../../i386/isa/sound/uart6850.c: In function `poll_uart6850': > ../../i386/isa/sound/uart6850.c:113: `timeout_func_t' undeclared (first use > this function) > ../../i386/isa/sound/uart6850.c:113: (Each undeclared identifier is > reported only once > ../../i386/isa/sound/uart6850.c:113: for each function it appears in.) > ../../i386/isa/sound/uart6850.c:113: parse error before `poll_uart6850' > *** Error code 1 I've already mentioned this as well. timeout_func_t is gone, Bruce thinks that it has only been used for bogus casts like the above. The actual timeout handlers should be converted to agree with the argument types for a timeout handler, instead of just casting them when passing down to timeout(9). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)