www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/29/21:48:29

Sender: nate AT cartsys DOT com
Message-ID: <36392722.1005911F@cartsys.com>
Date: Thu, 29 Oct 1998 18:40:34 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: How to kill off "value compu..." warning
References: <3638814E DOT EF94334D AT mail DOT aalborghus DOT dk>
Reply-To: djgpp AT delorie DOT com

Ole Laursen wrote:

> I compile using the -Wall switch, so the compiler correctly tells me
> that "value computed is not used", but I don't have anything to use it
> for, as the constructor will take care off putting the pointer to the
> struct in the right list. Believe me, it can be very annoying to get ten
> of those warnings every time I recompile the code, so I just wondered if
> it is somehow possible to turn off the warning for only a few lines of
> code (I don't want to disable it entirely), or to fix the problem in
> another way (I suspect I might be doing something wrong by just ignoring
> the return value).

I'm not sure if this applies in C++, but in C you can disable GCC's
warning about an unused value or variable by casting it to `void'.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019