Mercurial > cpython-lru_cache-weakref
diff Mac/Modules/ctl/_Ctlmodule.c @ 19723:2a9bbdbefbb1 legacy-trunk
Shut up many more gcc warnings.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Wed, 05 Sep 2001 10:31:52 +0000 |
| parents | 6eafc4a6359a |
| children | ed3dce17fc79 |
line wrap: on
line diff
--- a/Mac/Modules/ctl/_Ctlmodule.c Wed Sep 05 10:27:53 2001 +0000 +++ b/Mac/Modules/ctl/_Ctlmodule.c Wed Sep 05 10:31:52 2001 +0000 @@ -5,8 +5,12 @@ +#ifdef _WIN32 +#include "pywintoolbox.h" +#else #include "macglue.h" #include "pymactoolbox.h" +#endif /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ @@ -1676,7 +1680,8 @@ if (_err != noErr) { return PyMac_Error(_err); } - return Py_BuildValue("O&", OptResObj_New, hdl); + _res = Py_BuildValue("O&", OptResObj_New, hdl); + return _res; } @@ -2526,6 +2531,7 @@ } tracker = obj; Py_INCREF(tracker); + return 1; } static void @@ -2575,7 +2581,7 @@ if ( (self->ob_callbackdict = PyDict_New()) == NULL ) return -1; /* And store the Python callback */ - sprintf(keybuf, "%x", which); + sprintf(keybuf, "%x", (unsigned)which); if (PyDict_SetItemString(self->ob_callbackdict, keybuf, callback) < 0) return -1; return 0; @@ -2587,7 +2593,7 @@ char keybuf[9]; PyObject *func, *rv; - sprintf(keybuf, "%x", which); + sprintf(keybuf, "%x", (unsigned)which); if ( self->ob_callbackdict == NULL || (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) { PySys_WriteStderr("Control callback %x without callback object\n", which);
