[sane-devel] Some warnings/errors - please verify your backends

Olaf Meeuwissen olaf at epkowa.co.jp
Thu Apr 3 06:00:53 BST 2003


Henning Meier-Geinitz <henning at meier-geinitz.de> writes:

> Hi,
> 
> On Thu, Mar 27, 2003 at 08:21:35AM +0900, Olaf Meeuwissen wrote:
> > > From: der Mouse <mouse at Rodents.Montreal.QC.CA>
> > > 
> > > - A lot of "unused parameter" warnings.  I saw some SANE code that does
> > >   "var=var;" to quell such warnings, so presumably at least some people
> > >   care.
> > 
> > I've seen such code as well and find it horribly inelegant.  Any good
> > reasons why you can not replace:
> > 
> >   void useless_func( int unused_parameter )
> >   {
> >     unused_parameter = unused_parameter;
> >   }
> > 
> > with:
> > 
> >   void useless_func( int )
> >   {
> >   }
> > 
> > This gets rid of the "unused parameter" warnings just fine (with gcc
> > at least) and very clearly indicates that useless_func does not give
> > a damn about the parameter it gets passed.
> 
> With gcc-3.2 I'm getting the following error when I try your solution:
> 
> parameter name omitted

I use the above style in the iscan sources with gcc 2.95.4 without any
problems, but with a simple test program I got the same error as you
described.  Compiling the same program with g++ (2.95.4 and 3.2.3) as
the iscan sources are mostly C++ gave no errors.
Looks like my suggestion was biased by C++ experience ... :-}
-- 
Olaf Meeuwissen                            EPSON KOWA Corporation, ECS
GnuPG key: 6BE37D90/AB6B 0D1F 99E7 1BF5 EB97  976A 16C7 F27D 6BE3 7D90
Penguin's lib!       -- I hack, therefore I am --               LPIC-2



More information about the sane-devel mailing list