Article View: fr.comp.lang.c
Article #15363Re: Eviter un warning
From: Emmanuel Delahaye
Date: Fri, 30 Sep 2005 14:04
Date: Fri, 30 Sep 2005 14:04
35 lines
1548 bytes
1548 bytes
Harpo wrote on 29/09/05 :
> Bonjour,
>
> J'ai des fonctions dont la d�claration d�pend de l'API qui r�git la
> mani�re dont elles sont appel�es et il arrive parfois que je ne me
> serve pas d'1 argument :
> Exemple :
> int incr( int blah, int i )
> {
> return ++i;
> }
C'est une fa�on absurde et illisible d'�crire
int incr (int blah, int i)
{
return i + 1;
}
Pour ignorer l'argument :
int incr (int blah, int i)
{
(void) blah;
return i + 1;
}
C'est pas dans la FAQ ? Ca devrait...
--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html
"C is a sharp tool"
Technical Details
Message-ID:
<mn.f3c47d59b2a197ae.15512@YOURBRAnoos.fr>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!infeed-3.proxad.net!news18-e.free.fr!not-for-mailReferences:
<433b8a93$0$17226$8fcfb975@news.wanadoo.fr>Show Full Headers
Complete Article Headers
X-Google-Thread: f9822,79548392e83a3222 X-Google-Attributes: gidf9822,public X-Google-Language: FRENCH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!infeed-3.proxad.net!news18-e.free.fr!not-for-mail Subject: Re: Eviter un warning From: "Emmanuel Delahaye" <emdel@YOURBRAnoos.fr> References: <433b8a93$0$17226$8fcfb975@news.wanadoo.fr> Newsgroups: fr.comp.lang.c Message-ID: <mn.f3c47d59b2a197ae.15512@YOURBRAnoos.fr> X-Newsreader: MesNews/1.04.00.00-fr Date: Fri, 30 Sep 2005 16:04:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit Lines: 37 Organization: Guest of ProXad - France NNTP-Posting-Date: 30 Sep 2005 16:04:39 MEST NNTP-Posting-Host: 81.65.109.78 X-Trace: 1128089079 news18-e.free.fr 4309 81.65.109.78:13422 X-Complaints-To: abuse@proxad.net