Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Why does lint complain about this? Message-ID: <10113@smoke.BRL.MIL> Date: 25 Apr 89 06:22:12 GMT References: <75688@ti-csl.csc.ti.com> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <75688@ti-csl.csc.ti.com> ramey@m2.csc.ti.com (Joe Ramey) writes: >Why does lint say that the arg. is used inconsistently? I thought >that zero could be assigned to any pointer type. Shouldn't lint >recognize the constant 0 and realize that it is compatible with (char *) ? "lint" is correct. With no prototype in scope for the function (always the case for pre-ANSI C), the only conversion applied to function arguments is "default widening", e.g. char to int. The integer constant 0 is passed as an int, which indeed is not compatible with the parameter type later declared for that function.