From: Mario Frasca
Subject: updating-output & Variable is never used.
Date: 
Message-ID: <slrn98fvf4.62s.mario@tamino.cs.uu.nl>
still trying to get a collection of sources compiled, I also wanted to
get rid of all compilation warnings, as well (well, `most of them'
would be enough).

I have some methods all with this structure:
(defmethod display-object :around ((object displayable-object)
                                   &key (stream (display)))
  (with-slots (tick) object
    (updating-output (stream :unique-id object :cache-value tick)
      (call-next-method))))

when compiled, lisp informs me that
>>Warning: Variable STREAM is never used.<<

well, this is conform the description of CLIM2
>>updating-output [Macro] ... The stream argument is not evaluated<<

I wonder if I can get rid of these warnings anyhow... there are 7 of
them, each 5 lines long, and I fear they could distract me in a not too
far future and prevent me from seeing `real' warnings.

all hints welcome.

Mario

From: Christopher J. Vogt
Subject: Re: updating-output & Variable is never used.
Date: 
Message-ID: <3A8807C4.D5E7C8B5@computer.org>
Mario Frasca wrote:
> 
> still trying to get a collection of sources compiled, I also wanted to
> get rid of all compilation warnings, as well (well, `most of them'
> would be enough).
> 
> I have some methods all with this structure:
> (defmethod display-object :around ((object displayable-object)
>                                    &key (stream (display)))
    (declare (ignore stream))
Add the above line as the first line of the body to tell the compiler to be quiet.
From: Mario Frasca
Subject: Re: updating-output & Variable is never used.
Date: 
Message-ID: <slrn98kfdo.7in.mario@tamino.cs.uu.nl>
Hi, thanks for the reply, but...

On Mon, 12 Feb 2001 15:56:34 GMT, Christopher J. Vogt <····@computer.org> wrote:
>
>    (declare (ignore stream))
>Add the above line as the first line of the body to tell the compiler
>to be quiet.

if I do so, I get the following

;;; Compiling file lisp:ideal-edit;code;display.lisp
;;;   (/users/mario/Local/software/lisp/ideal-edit/code/display.lisp)
; While compiling (:INTERNAL (METHOD DISPLAY-OBJECT :AROUND
  (DISPLAYABLE-OBJECT)) 0):
Warning: variable STREAM is used yet it was declared ignored
; While compiling
;   (FLET (:INTERNAL (METHOD DISPLAY-OBJECT :AROUND (DISPLAYABLE-OBJECT)) 0)
;     CLIM-INTERNALS::UPDATING-OUTPUT-BODY):
Warning: Variable STREAM is never used.

...by the way, I'm using:
Allegro CL Enterprise Edition 5.0 [SPARC] (8/29/98 12:15)
Copyright (C) 1985-1998, Franz Inc., Berkeley, CA, USA.  All Rights Reserved.

Mario
From: Pierre R. Mai
Subject: Re: updating-output & Variable is never used.
Date: 
Message-ID: <87y9vbss6x.fsf@orion.bln.pmsf.de>
·····@cs.uu.nl (Mario Frasca) writes:

> I have some methods all with this structure:
> (defmethod display-object :around ((object displayable-object)
>                                    &key (stream (display)))
>   (with-slots (tick) object
>     (updating-output (stream :unique-id object :cache-value tick)
>       (call-next-method))))
> 
> when compiled, lisp informs me that
> >>Warning: Variable STREAM is never used.<<

Side note: According to the CLHS this should just be a style-warning,
and not a warning.

> well, this is conform the description of CLIM2
> >>updating-output [Macro] ... The stream argument is not evaluated<<

Hmmm, the easy answer would be to declare the variable ignorable (or
ignore).  But one wonders why stream has to be passed to
updating-output at all, if it is neither used to evaluate it, nor to
bind it, which seems to be the case, according to CLIM2 and the
implementation behaviour.  Maybe the expansion of updating-output
should itself declare the variable ignorable in that case.

Regs, Pierre.

-- 
Pierre R. Mai <····@acm.org>                    http://www.pmsf.de/pmai/
 The most likely way for the world to be destroyed, most experts agree,
 is by accident. That's where we come in; we're computer professionals.
 We cause accidents.                           -- Nathaniel Borenstein
From: Mario Frasca
Subject: Re: updating-output & Variable is never used.
Date: 
Message-ID: <slrn98kjle.7in.mario@tamino.cs.uu.nl>
>[...] Maybe the expansion of updating-output
>should itself declare the variable ignorable in that case.

this sounds like: the warning is not caused by my code but by the
implementation of CLIM in the LISP I'm using.

so that I just have to live with it and ignore it `manually'.

hope I interpreted your point correctly.

thanks
Mario