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.
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 4b0958a..643693e 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -667,7 +667,7 @@
char buf[2048];
char *vptr;
int len;
- const unsigned char *p;
+ unsigned char *p;
if (certificate == NULL)
return peer_alt_names;
diff --git a/Modules/_struct.c b/Modules/_struct.c
index b8f1525..a7fce10 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -182,6 +182,7 @@
/* Same, but handling unsigned long */
+#ifndef PY_STRUCT_OVERFLOW_MASKING
static int
get_ulong(PyObject *v, unsigned long *p)
{
@@ -201,6 +202,7 @@
}
return 0;
}
+#endif /* PY_STRUCT_OVERFLOW_MASKING */
#ifdef HAVE_LONG_LONG