Re: gamma warnings bug



   From: Owen Taylor <otaylor@gtk.org>
   Date: 24 May 1998 10:47:59 -0400

   To my understanding, parameter names in function prototypes are
   basically ignored. So there is no way that:

   void            gtk_preview_set_gamma          (double           gamma);

   Could shadow the global gamma() declaration. 

Erm, well, technically it shadows, it's just rather immaterial since
the scope of the shadow is negligable.

   I'm inclined say you should either drop the -Wshadow, or ignore the
   warning.  Generally, once you start adding warnings beyond -Wall,
   you tend to get lots of warnings about things which aren't errors
   at all.

Hmm...  good point.

   On the other hand, the name could be changed to _gamma, or gam, but
   who knows if somebody would include a header file with functions by
   those names? It seems like a bit of a lost cause.

We could drop the "gamma".

   void            gtk_preview_set_gamma          (double);

--rich



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]