www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/25/09:52:29

Date: Mon, 25 Nov 1996 14:40:44 GMT
Message-Id: <199611251440.OAA11122@mailhost.sm.ic.ac.uk>
Mime-Version: 1.0
To: <djgpp AT delorie DOT com>
From: p DOT dixon AT ic DOT ac DOT uk (Paul Dixon)
Subject: Re: DJGPP weekly digest for 23 Nov 1996

>   (1) It has many functions all of type void name(val N,val T1,val T2){...}.
> (val is an 8-byte class type which I declared). These functions MUST be all
> the same type, as their addresses are used as values. But some of these
> functions don't use some of their parameters. As a result the fault output
> is stuffed out with hundreds of `warning: unused parameter' warning lines.
> How to stop these warning and still use -Wall for its other useful properties?

Surely the 'correct ' solution is to declare functions as

name( val N, val, val ){...} 
                ^^   ^^
(parameter not named if never used)

This should prevent compiler warnings about unused parameters in only cases
where the warnings are expected...

Paul
------------------------------------------------------------------------
Paul Dixon                                   Email: p DOT dixon AT ic DOT ac DOT uk
Software Engineer                              tel:   +44 (171) 725 6258
Academic Dept of Paediatrics                   fax:   +44 (171) 725 6284
St Mary's Hospital Medical School
 (a constituent college of 
                     Imperial College of Science, Technology & Medicine)
Norfolk Place, London W2 1PG, UK
------------------------------------------------------------------------

- Raw text -


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