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

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 initbuiltin(char *name) { struct inittab *p; PyObject *mod; if ((mod = PyImportFindExtension(name, name)) != NULL) return 1; to this: static int initbuiltin(char *name) { struct inittab *p; if (PyImportFindExtension(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/