[Python-Dev] Fixing compiler warnings (bug #445960)

M.-A. Lemburg mal@lemburg.com
Thu, 04 Oct 2001 10:48:01 +0200


Greg Ward wrote:
> 
> What's the general feeling/policy on fixing very minor problems that cause
> legitimate compiler warnings with some compilers?  ISTR that Tim is adamant
> about keeping Python warning-free on Windows with MSVC, but what about, say,
> the compiler that ships with IRIX 6.5?  It's not a widely-used platform, but
> the compiler does catch some genuine, albeit small, problems -- mostly of the
> "variable set but never used" variety.
> 
> It looks like most fixes are along the lines of changing this:
> 
> static int
> init_builtin(char *name)
> {
>         struct _inittab *p;
>         PyObject *mod;
> 
>         if ((mod = _PyImport_FindExtension(name, name)) != NULL)
>                 return 1;
> 
> to this:
> 
> static int
> init_builtin(char *name)
> {
>         struct _inittab *p;
>
>         if (_PyImport_FindExtension(name, name) != NULL)
>                 return 1;

If it improves code quality, I'd say that any valid code warning should
be considered and fixed (doesn't really matter what the source 
is ;-).

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/