From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 19 Sep 2005 17:08:50 -0400 From: ISHWAR RATTAN To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Compiler question In-Reply-To: <7871fcf5050919131178a5d9fd@mail.gmail.com> Message-ID: References: <7871fcf5050919131178a5d9fd@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Topicbox-Message-UUID: 8cbc7356-ead0-11e9-9d60-3106f5b1d025 On Mon, 19 Sep 2005, Joel Salomon wrote: > On 9/19/05, Russ Cox wrote: > The compiler is telling you that line 8 might as well read: > > > 8 freenode(tmp); > > The value you store in tmp is never used. > > Does the compiler know that about freenode()? Well the freenode function is: lnode * freenode(lonode *ptr) { if (ptr != nil) { free((void *)ptr); ptr = nil; } return ptr; } So ptr = freenode(ptr); looks resonable way to call. -ishwar