mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Shut up many more gcc warnings.
This commit is contained in:
parent
5a1516bce5
commit
fd064863eb
31 changed files with 186 additions and 110 deletions
|
|
@ -169,6 +169,7 @@ settrackfunc(PyObject *obj)
|
|||
}
|
||||
tracker = obj;
|
||||
Py_INCREF(tracker);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -218,7 +219,7 @@ setcallback(PyObject *myself, OSType which, PyObject *callback, UniversalProcPtr
|
|||
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;
|
||||
|
|
@ -230,7 +231,7 @@ callcallback(ControlObject *self, OSType which, PyObject *arglist)
|
|||
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);
|
||||
|
|
@ -554,7 +555,8 @@ _err = GetControlData(_self->ob_itself,
|
|||
if (_err != noErr) {
|
||||
return PyMac_Error(_err);
|
||||
}
|
||||
return Py_BuildValue("O&", OptResObj_New, hdl);
|
||||
_res = Py_BuildValue("O&", OptResObj_New, hdl);
|
||||
return _res;
|
||||
"""
|
||||
|
||||
f = ManualGenerator("GetControlData_Handle", getcontroldata_handle_body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue