Mail Archives: djgpp/1997/10/28/00:32:10

From: ovek AT arcticnet DOT no (Ove Kaaven)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Warning control. Is there more convenient way?
Date: Fri, 24 Oct 1997 08:19:11 GMT
Organization: Vplan Programvare AS
Lines: 19
Message-ID: <62pkut$md0$>
References: <AD7EoFq8hO AT rsuzi DOT pgu DOT karelia DOT ru> <62mt5o$rsb$6 AT 195 DOT 26 DOT 68 DOT 21>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Erik Max Francis <max AT alcyone DOT com> wrote:

>    `-Wunused'
>     Warn whenever a variable is unused aside from its declaration,
>     whenever a function is declared static but never defined, whenever
>     a label is declared but not used, and whenever a statement
>     computes a result that is explicitly not used.

>     To suppress this warning for an expression, simply cast it to
>     void.  For unused variables and parameters, use the `unused'
>     attribute (*note Variable Attributes::.).

Didn't you read that last paragraph and follow the link?

int variable __attribute__((unused));

=> no unused warning.

- Raw text -

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