Fix nearly all compilation warnings under Apple gcc-4.0. Tested with OPT="-g

-Wall -Wstrict-prototypes -Werror" in both --with-pydebug mode and --without.
There's still a batch of non-prototype warnings in Xlib.h that I don't know how
to fix.
This commit is contained in:
Jeffrey Yasskin 2009-05-29 03:44:31 +00:00
parent 822b87f276
commit 7937d939b1
5 changed files with 4 additions and 26 deletions

View File

@ -27,12 +27,6 @@ PyObject *EventHandlerCallRef_New(EventHandlerCallRef itself);
PyObject *EventRef_New(EventRef itself);
/********** EventTypeSpec *******/
static PyObject*
EventTypeSpec_New(EventTypeSpec *in)
{
return Py_BuildValue("ll", in->eventClass, in->eventKind);
}
static int
EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out)
{
@ -67,12 +61,6 @@ HIPoint_Convert(PyObject *v, HIPoint *out)
/********** EventHotKeyID *******/
static PyObject*
EventHotKeyID_New(EventHotKeyID *in)
{
return Py_BuildValue("ll", in->signature, in->id);
}
static int
EventHotKeyID_Convert(PyObject *v, EventHotKeyID *out)
{

View File

@ -1598,7 +1598,7 @@ static PyObject *CtlObj_GetBevelButtonMenuValue(ControlObject *_self, PyObject *
{
PyObject *_res = NULL;
OSErr _err;
SInt16 outValue;
UInt16 outValue;
#ifndef GetBevelButtonMenuValue
PyMac_PRECHECK(GetBevelButtonMenuValue);
#endif

View File

@ -667,7 +667,7 @@ _get_peer_alt_names (X509 *certificate) {
char buf[2048];
char *vptr;
int len;
const unsigned char *p;
unsigned char *p;
if (certificate == NULL)
return peer_alt_names;

View File

@ -182,6 +182,7 @@ get_long(PyObject *v, long *p)
/* Same, but handling unsigned long */
#ifndef PY_STRUCT_OVERFLOW_MASKING
static int
get_ulong(PyObject *v, unsigned long *p)
{
@ -201,6 +202,7 @@ get_ulong(PyObject *v, unsigned long *p)
}
return 0;
}
#endif /* PY_STRUCT_OVERFLOW_MASKING */
#ifdef HAVE_LONG_LONG

View File

@ -535,18 +535,6 @@ compiler_exit_scope(struct compiler *c)
}
/* Allocate a new "anonymous" local variable.
Used by list comprehensions and with statements.
*/
static PyObject *
compiler_new_tmpname(struct compiler *c)
{
char tmpname[256];
PyOS_snprintf(tmpname, sizeof(tmpname), "_[%d]", ++c->u->u_tmpname);
return PyString_FromString(tmpname);
}
/* Allocate a new block and return a pointer to it.
Returns NULL on error.
*/