Mail Archives: djgpp/1996/11/25/09:52:29
> (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 -