gcc -Wall is complaining about possible use of errors_module without initialization in the initpyexpat function. Here's the offending code: sys_modules = PySys_GetObject("modules"); { PyObject *errmod_name = PyString_FromString("pyexpat.errors"); if (errmod_name != NULL) { errors_module = PyDict_GetItem(d, errmod_name); if (errors_module == NULL) { errors_module = PyModule_New("pyexpat.errors"); if (errors_module != NULL) { PyDict_SetItemString(d, "errors", errors_module); PyDict_SetItem(sys_modules, errmod_name, errors_module); } } Py_DECREF(errmod_name); if (errors_module == NULL) /* Don't code dump later! */ return; } } errors_dict = PyModule_GetDict(errors_module); It is indeed the case that errors_module can be used without initialization. If PyString_FromString("pyexpat.errors") fails, you ignore the error and will immediately call PyModule_GetDict with an uninitialized variable. You ought to check for the error condition and bail cleanly, rather than ignoring it and failing somewhere else. I also wonder why the code that does this check is in its own set of curly braces; thus, the post to python-dev to discuss the style issue. Why did you do this? Is it approved Python style? It looks cluttered to me. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4