summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_cursesmodule.c14
-rw-r--r--Modules/_tkinter.c3
-rw-r--r--Modules/almodule.c2
-rw-r--r--Modules/arraymodule.c8
-rw-r--r--Modules/audioop.c38
-rw-r--r--Modules/cdmodule.c2
-rw-r--r--Modules/clmodule.c1
-rw-r--r--Modules/cmathmodule.c2
-rw-r--r--Modules/cryptmodule.c1
-rw-r--r--Modules/dbmmodule.c1
-rw-r--r--Modules/fcntlmodule.c10
-rw-r--r--Modules/fmmodule.c1
-rw-r--r--Modules/imageop.c4
-rw-r--r--Modules/imgfile.c13
-rw-r--r--Modules/main.c4
-rw-r--r--Modules/parsermodule.c4
-rw-r--r--Modules/posixmodule.c9
-rw-r--r--Modules/regexmodule.c2
-rw-r--r--Modules/regexpr.c4
-rw-r--r--Modules/rgbimgmodule.c2
-rw-r--r--Modules/selectmodule.c4
-rw-r--r--Modules/signalmodule.c4
-rw-r--r--Modules/socketmodule.c5
-rw-r--r--Modules/stropmodule.c6
-rw-r--r--Modules/syslogmodule.c2
-rw-r--r--Modules/threadmodule.c2
-rw-r--r--Modules/xxmodule.c1
27 files changed, 93 insertions, 56 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 25a18a5..2786854 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -168,9 +168,13 @@ typedef struct {
WINDOW *pad;
} PyCursesPadObject;
+#if 0
staticforward PyTypeObject PyCursesScreen_Type;
+#endif
staticforward PyTypeObject PyCursesWindow_Type;
+#if 0
staticforward PyTypeObject PyCursesPad_Type;
+#endif
#define PyCursesScreen_Check(v) ((v)->ob_type == &PyCursesScreen_Type)
#define PyCursesWindow_Check(v) ((v)->ob_type == &PyCursesWindow_Type)
@@ -386,7 +390,7 @@ PyCursesWindow_AddCh(self,arg)
int rtn;
int x, y;
int ch;
- int attr, attr_old;
+ int attr, attr_old = 0;
int use_xy = FALSE, use_attr = FALSE;
switch (ARG_COUNT(arg)) {
@@ -436,7 +440,7 @@ PyCursesWindow_InsCh(self,arg)
int rtn;
int x, y;
int ch;
- int attr, attr_old;
+ int attr, attr_old = 0;
int use_xy = TRUE, use_attr = FALSE;
switch (ARG_COUNT(arg)) {
@@ -542,7 +546,7 @@ PyCursesWindow_AddStr(self,arg)
int rtn;
int x, y;
char *str;
- int attr, attr_old;
+ int attr, attr_old = 0;
int use_xy = FALSE, use_attr = FALSE;
switch (ARG_COUNT(arg)) {
@@ -1116,6 +1120,7 @@ PyCursesPad_New(pad)
/* -------------------------------------------------------*/
+#if 0
static PyTypeObject PyCursesScreen_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -1134,6 +1139,7 @@ static PyTypeObject PyCursesScreen_Type = {
0, /*tp_as_mapping*/
0, /*tp_hash*/
};
+#endif
static PyTypeObject PyCursesWindow_Type = {
PyObject_HEAD_INIT(&PyType_Type)
@@ -1154,6 +1160,7 @@ static PyTypeObject PyCursesWindow_Type = {
0, /*tp_hash*/
};
+#if 0
static PyTypeObject PyCursesPad_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
@@ -1172,6 +1179,7 @@ static PyTypeObject PyCursesPad_Type = {
0, /*tp_as_mapping*/
0, /*tp_hash*/
};
+#endif
/* -------------------------------------------------------*/
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 062d746..10d9f9f 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1051,7 +1051,7 @@ Tktt_Print (self, fp, flags)
{
TkttObject *v = (TkttObject *) self;
- fprintf(fp, "<tktimertoken at 0x%x%s>", v,
+ fprintf(fp, "<tktimertoken at 0x%lx%s>", (long)v,
v->func == NULL ? ", handler deleted" : "");
return 0;
}
@@ -1139,6 +1139,7 @@ Tkapp_MainLoop (self, args)
quitMainLoop = 0;
while (Tk_GetNumMainWindows() > threshold && !quitMainLoop && !errorInCmd)
{
+ /* XXX Ought to check for other signals! */
if (PyOS_InterruptOccurred ())
{
PyErr_SetNone (PyExc_KeyboardInterrupt);
diff --git a/Modules/almodule.c b/Modules/almodule.c
index 52d3bad..6972e82 100644
--- a/Modules/almodule.c
+++ b/Modules/almodule.c
@@ -366,7 +366,6 @@ al_writesamps (self, args)
portobject *self;
object *args;
{
- long count;
char *buf;
int size, width;
ALconfig c;
@@ -623,7 +622,6 @@ al_queryparams(self, args)
long *PVbuffer;
long PVdummy[2];
object *v;
- object *w;
if (!getlongarg (args, &device))
return NULL;
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 2657528..19ffe47 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -64,11 +64,15 @@ staticforward typeobject Arraytype;
/* Forward */
static object *newarrayobject PROTO((int, struct arraydescr *));
+#if 0
static int getarraysize PROTO((object *));
+#endif
static object *getarrayitem PROTO((object *, int));
static int setarrayitem PROTO((object *, int, object *));
+#if 0
static int insarrayitem PROTO((object *, int, object *));
static int addarrayitem PROTO((object *, object *));
+#endif
static object *
c_getitem(ap, i)
@@ -278,6 +282,7 @@ newarrayobject(size, descr)
return (object *) op;
}
+#if 0
static int
getarraysize(op)
object *op;
@@ -288,6 +293,7 @@ getarraysize(op)
}
return ((arrayobject *)op) -> ob_size;
}
+#endif
static object *
getarrayitem(op, i)
@@ -338,6 +344,7 @@ ins1(self, where, v)
return (*self->ob_descr->setitem)(self, where, v);
}
+#if 0
static int
insarrayitem(op, where, newitem)
object *op;
@@ -363,6 +370,7 @@ addarrayitem(op, newitem)
return ins1((arrayobject *)op,
(int) ((arrayobject *)op)->ob_size, newitem);
}
+#endif
/* Methods */
diff --git a/Modules/audioop.c b/Modules/audioop.c
index e4c37e6..a1b3e25 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -175,7 +175,7 @@ audioop_getsample(self, args)
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
if ( !getargs(args, "(s#ii)", &cp, &len, &size, &i) )
@@ -200,7 +200,7 @@ audioop_max(self, args)
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
int max = 0;
@@ -226,7 +226,7 @@ audioop_minmax(self, args)
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
int min = 0x7fffffff, max = -0x7fffffff;
@@ -252,7 +252,7 @@ audioop_avg(self, args)
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
float avg = 0.0;
@@ -281,7 +281,7 @@ audioop_rms(self, args)
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
float sum_squares = 0.0;
@@ -493,7 +493,7 @@ audioop_avgpp(self, args)
object *args;
{
signed char *cp;
- int len, size, val, prevval, prevextremevalid = 0, prevextreme;
+ int len, size, val = 0, prevval = 0, prevextremevalid = 0, prevextreme = 0;
int i;
float avg = 0.0;
int diff, prevdiff, extremediff, nextreme = 0;
@@ -551,7 +551,7 @@ audioop_maxpp(self, args)
object *args;
{
signed char *cp;
- int len, size, val, prevval, prevextremevalid = 0, prevextreme;
+ int len, size, val = 0, prevval = 0, prevextremevalid = 0, prevextreme = 0;
int i;
int max = 0;
int diff, prevdiff, extremediff;
@@ -605,7 +605,7 @@ audioop_cross(self, args)
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
int prevval, ncross;
@@ -634,7 +634,7 @@ audioop_mul(self, args)
object *args;
{
signed char *cp, *ncp;
- int len, size, val;
+ int len, size, val = 0;
double factor, fval, maxval;
object *rv;
int i;
@@ -677,7 +677,7 @@ audioop_tomono(self, args)
object *args;
{
signed char *cp, *ncp;
- int len, size, val1, val2;
+ int len, size, val1 = 0, val2 = 0;
double fac1, fac2, fval, maxval;
object *rv;
int i;
@@ -723,7 +723,7 @@ audioop_tostereo(self, args)
object *args;
{
signed char *cp, *ncp;
- int len, size, val1, val2, val;
+ int len, size, val1, val2, val = 0;
double fac1, fac2, fval, maxval;
object *rv;
int i;
@@ -777,7 +777,7 @@ audioop_add(self, args)
object *args;
{
signed char *cp1, *cp2, *ncp;
- int len1, len2, size, val1, val2;
+ int len1, len2, size, val1 = 0, val2 = 0;
object *rv;
int i;
@@ -823,7 +823,7 @@ audioop_bias(self, args)
object *args;
{
signed char *cp, *ncp;
- int len, size, val;
+ int len, size, val = 0;
object *rv;
int i;
int bias;
@@ -862,7 +862,7 @@ audioop_reverse(self, args)
{
signed char *cp;
unsigned char *ncp;
- int len, size, val;
+ int len, size, val = 0;
object *rv;
int i, j;
@@ -901,7 +901,7 @@ audioop_lin2lin(self, args)
{
signed char *cp;
unsigned char *ncp;
- int len, size, size2, val;
+ int len, size, size2, val = 0;
object *rv;
int i, j;
@@ -939,7 +939,7 @@ audioop_lin2ulaw(self, args)
{
signed char *cp;
unsigned char *ncp;
- int len, size, val;
+ int len, size, val = 0;
object *rv;
int i;
@@ -1011,9 +1011,9 @@ audioop_lin2adpcm(self, args)
{
signed char *cp;
signed char *ncp;
- int len, size, val, step, valpred, delta, index, sign, vpdiff, diff;
+ int len, size, val = 0, step, valpred, delta, index, sign, vpdiff, diff;
object *rv, *state, *str;
- int i, outputbuffer, bufferstep;
+ int i, outputbuffer = 0, bufferstep;
if ( !getargs(args, "(s#iO)",
&cp, &len, &size, &state) )
@@ -1123,7 +1123,7 @@ audioop_adpcm2lin(self, args)
signed char *ncp;
int len, size, valpred, step, delta, index, sign, vpdiff;
object *rv, *str, *state;
- int i, inputbuffer, bufferstep;
+ int i, inputbuffer = 0, bufferstep;
if ( !getargs(args, "(s#iO)",
&cp, &len, &size, &state) )
diff --git a/Modules/cdmodule.c b/Modules/cdmodule.c
index 63c90b8..a773e99 100644
--- a/Modules/cdmodule.c
+++ b/Modules/cdmodule.c
@@ -532,7 +532,7 @@ CD_callback(arg, type, data)
CDDATATYPES type;
void *data;
{
- object *result, *args, *v;
+ object *result, *args, *v = NULL;
char *p;
int i;
cdparserobject *self;
diff --git a/Modules/clmodule.c b/Modules/clmodule.c
index 64b8a47..02f1ceb 100644
--- a/Modules/clmodule.c
+++ b/Modules/clmodule.c
@@ -90,7 +90,6 @@ static int
param_type_is_float(clobject *self, int param)
{
int bufferlength;
- int ret;
if (self->ob_paramtypes == NULL) {
error_handler_called = 0;
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 2f22bfc..4e1715c 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -33,8 +33,10 @@ static Py_complex c_1 = {1., 0.};
static Py_complex c_half = {0.5, 0.};
static Py_complex c_i = {0., 1.};
static Py_complex c_i2 = {0., 0.5};
+#if 0
static Py_complex c_mi = {0., -1.};
static Py_complex c_pi2 = {M_PI/2., 0.};
+#endif
/* forward declarations */
staticforward Py_complex c_log();
diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c
index 13c79ba..84f05b1 100644
--- a/Modules/cryptmodule.c
+++ b/Modules/cryptmodule.c
@@ -15,7 +15,6 @@ static object *crypt_crypt(self, args)
char *word, *salt;
extern char * crypt();
- struct passwd *p;
if (!getargs(args, "(ss)", &word, &salt)) {
return NULL;
}
diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c
index 85934f2..26449c2 100644
--- a/Modules/dbmmodule.c
+++ b/Modules/dbmmodule.c
@@ -105,7 +105,6 @@ dbm_subscript(dp, key)
dbmobject *dp;
register object *key;
{
- object *v;
datum drec, krec;
if (!getargs(key, "s#", &krec.dptr, &krec.dsize) )
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index ae6bcdd..d08123a 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -34,6 +34,14 @@ PERFORMANCE OF THIS SOFTWARE.
#include "allobjects.h"
#include "modsupport.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
#include <fcntl.h>
@@ -147,7 +155,6 @@ fcntl_flock(self, args)
int fd;
int code;
int ret;
- FILE *f;
if (!getargs(args, "(ii)", &fd, &code))
return NULL;
@@ -195,7 +202,6 @@ fcntl_lockf(self, args)
object *args;
{
int fd, code, len = 0, start = 0, whence = 0, ret;
- FILE *f;
if (!PyArg_ParseTuple(args, "ii|iii", &fd, &code, &len,
&start, &whence))
diff --git a/Modules/fmmodule.c b/Modules/fmmodule.c
index 01cf268..2f6031a 100644
--- a/Modules/fmmodule.c
+++ b/Modules/fmmodule.c
@@ -134,7 +134,6 @@ fh_getfontinfo(self, args)
object *args;
{
fmfontinfo info;
- object *v;
if (!getnoarg(args))
return NULL;
if (fmgetfontinfo(self->fh_fh, &info) < 0) {
diff --git a/Modules/imageop.c b/Modules/imageop.c
index 90e4f54..686d0c6 100644
--- a/Modules/imageop.c
+++ b/Modules/imageop.c
@@ -458,7 +458,7 @@ imageop_grey22grey(self, args)
int x, y, len, nlen;
unsigned char *cp, *ncp;
object *rv;
- int i, pos, value, nvalue;
+ int i, pos, value = 0, nvalue;
if ( !getargs(args, "(s#ii)", &cp, &len, &x, &y) )
return 0;
@@ -495,7 +495,7 @@ imageop_grey42grey(self, args)
int x, y, len, nlen;
unsigned char *cp, *ncp;
object *rv;
- int i, pos, value, nvalue;
+ int i, pos, value = 0, nvalue;
if ( !getargs(args, "(s#ii)", &cp, &len, &x, &y) )
return 0;
diff --git a/Modules/imgfile.c b/Modules/imgfile.c
index 1c42b35..76f123c 100644
--- a/Modules/imgfile.c
+++ b/Modules/imgfile.c
@@ -61,7 +61,8 @@ static int error_called;
/* The error handler */
-static imgfile_error(str)
+static void
+imgfile_error(str)
char *str;
{
err_setstr(ImgfileError, str);
@@ -199,7 +200,7 @@ static IMAGE *glob_image;
static long *glob_datap;
static int glob_width, glob_z, glob_ysize;
-static
+static void
xs_get(buf, y)
short *buf;
int y;
@@ -210,7 +211,7 @@ xs_get(buf, y)
getrow(glob_image, buf, y, glob_z);
}
-static
+static void
xs_put_c(buf, y)
short *buf;
int y;
@@ -222,7 +223,7 @@ xs_put_c(buf, y)
*datap++ = (*buf++) & 0xff;
}
-static
+static void
xs_put_0(buf, y)
short *buf;
int y;
@@ -233,7 +234,7 @@ xs_put_0(buf, y)
while ( width-- )
*datap++ = (*buf++) & 0xff;
}
-static
+static void
xs_put_12(buf, y)
short *buf;
int y;
@@ -291,7 +292,7 @@ imgfile_readscaled(self, args)
char *filter;
double blur;
int extended;
- int fmode;
+ int fmode = 0;
int yfirst, ylast, ystep;
/*
diff --git a/Modules/main.c b/Modules/main.c
index 6027d28..2a8bbde 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -174,7 +174,7 @@ main(argc, argv)
filename = argv[optind];
if (Py_VerboseFlag ||
- command == NULL && filename == NULL && isatty((int)fileno(fp)))
+ (command == NULL && filename == NULL && isatty((int)fileno(fp))))
fprintf(stderr, "Python %s\n%s\n",
Py_GetVersion(), Py_GetCopyright());
@@ -222,7 +222,7 @@ main(argc, argv)
sts = PyRun_AnyFile(stdin, "<stdin>") != 0;
Py_Exit(sts);
- /*NOTREACHED*/
+ return 0; /* Make gcc -Wall happy */
}
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index d2bc236..7a23d8d 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -566,7 +566,7 @@ parser_tuple2ast(self, args)
PyObject *tuple = 0;
PyObject *temp = 0;
int ok;
- int start_sym;
+ int start_sym = 0;
if (!PyArg_ParseTuple(args, "O:tuple2ast", &tuple))
return (0);
@@ -1829,7 +1829,7 @@ validate_comp_op(tree)
break;
}
}
- else if (res = validate_numnodes(tree, 2, "comp_op")) {
+ else if ((res = validate_numnodes(tree, 2, "comp_op")) != 0) {
res = (validate_ntype(CHILD(tree, 0), NAME)
&& validate_ntype(CHILD(tree, 1), NAME)
&& (((strcmp(STR(CHILD(tree, 0)), "is") == 0)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index f8cc298..119e871 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -52,6 +52,10 @@ PERFORMANCE OF THIS SOFTWARE.
#include <sys/wait.h> /* For WNOHANG */
#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
#include "mytime.h" /* For clock_t on some systems */
#ifdef HAVE_FCNTL_H
@@ -574,7 +578,7 @@ posix_listdir(self, args)
while ((ep = readdir(dirp)) != NULL) {
if (ep->d_name[0] == '.' &&
(NAMLEN(ep) == 1 ||
- ep->d_name[1] == '.' && NAMLEN(ep) == 2))
+ (ep->d_name[1] == '.' && NAMLEN(ep) == 2)))
continue;
v = newsizedstringobject(ep->d_name, NAMLEN(ep));
if (v == NULL) {
@@ -709,7 +713,6 @@ posix_uname(self, args)
object *args;
{
struct utsname u;
- object *v;
int res;
if (!getnoarg(args))
return NULL;
@@ -776,7 +779,7 @@ posix__exit(self, args)
if (!getintarg(args, &sts))
return NULL;
_exit(sts);
- /* NOTREACHED */
+ return NULL; /* Make gcc -Wall happy */
}
#ifdef HAVE_EXECV
diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c
index 342d771..c9f9781 100644
--- a/Modules/regexmodule.c
+++ b/Modules/regexmodule.c
@@ -40,6 +40,8 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Python.h"
+#include <ctype.h>
+
#include "regexpr.h"
static PyObject *RegexError; /* Exception */
diff --git a/Modules/regexpr.c b/Modules/regexpr.c
index 4f497f1..9f03e7c 100644
--- a/Modules/regexpr.c
+++ b/Modules/regexpr.c
@@ -281,10 +281,10 @@ int size;
regexp_t bufp;
{
int a, pos, op, current_level, level, opcode;
- int pattern_offset, alloc;
+ int pattern_offset = 0, alloc;
int starts[NUM_LEVELS * MAX_NESTING], starts_base;
int future_jumps[MAX_NESTING], num_jumps;
- unsigned char ch;
+ unsigned char ch = '\0';
char *pattern, *translate;
int next_register, paren_depth, num_open_registers, open_registers[RE_NREGS];
int beginning_context;
diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c
index 713deae..ad45c16 100644
--- a/Modules/rgbimgmodule.c
+++ b/Modules/rgbimgmodule.c
@@ -204,7 +204,7 @@ FILE *outf;
/*unsigned*/ long *tab;
int len;
{
- int r;
+ int r = 0;
while(len) {
r = putlong(outf,*tab++);
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index c53adc1..3cbd4e8 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -39,6 +39,10 @@ have any value except INVALID_SOCKET.
#include "modsupport.h"
#include "ceval.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <sys/types.h>
#ifdef MS_WINDOWS
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 48eb03d..9e7f239 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -34,6 +34,10 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Python.h"
#include "intrcheck.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <signal.h>
#ifndef SIG_ERR
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index b31ea04..3e510fe 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -85,6 +85,10 @@ Socket methods:
#include "Python.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <sys/types.h>
#include "mytime.h"
@@ -259,6 +263,7 @@ BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret)
int errnop;
#endif /* HAVE_GETHOSTBYNAME_R */
+ memset((void *) addr_ret, '\0', sizeof(*addr_ret));
if (name[0] == '\0') {
addr_ret->sin_addr.s_addr = INADDR_ANY;
return 4;
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c
index 7012a4f..3dc0c52 100644
--- a/Modules/stropmodule.c
+++ b/Modules/stropmodule.c
@@ -538,7 +538,7 @@ strop_atoi(self, args)
if (args != NULL && is_tupleobject(args)) {
if (!getargs(args, "(si)", &s, &base))
return NULL;
- if (base != 0 && base < 2 || base > 36) {
+ if ((base != 0 && base < 2) || base > 36) {
err_setstr(ValueError, "invalid base for atoi()");
return NULL;
}
@@ -585,7 +585,7 @@ strop_atol(self, args)
if (args != NULL && is_tupleobject(args)) {
if (!getargs(args, "(si)", &s, &base))
return NULL;
- if (base != 0 && base < 2 || base > 36) {
+ if ((base != 0 && base < 2) || base > 36) {
err_setstr(ValueError, "invalid base for atol()");
return NULL;
}
@@ -701,7 +701,7 @@ strop_translate(self, args)
trans_table[i]=Py_CHARMASK(table[i]);
if (delete!=NULL) {
for(i=0; i<dellen; i++)
- trans_table[delete[i]]=-1;
+ trans_table[(int)delete[i]]=-1;
}
result = PyString_FromStringAndSize((char *)NULL, inlen);
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c
index 44937fb..2ecf76d 100644
--- a/Modules/syslogmodule.c
+++ b/Modules/syslogmodule.c
@@ -71,7 +71,7 @@ syslog_syslog(self, args)
PyObject * self;
PyObject * args;
{
- char *message, *s;
+ char *message;
int priority = LOG_INFO | LOG_USER;
if (!PyArg_ParseTuple(args, "is;[priority,] message string",
diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c
index 0fb7e38..38394a4 100644
--- a/Modules/threadmodule.c
+++ b/Modules/threadmodule.c
@@ -313,7 +313,7 @@ static struct methodlist thread_methods[] = {
void
initthread()
{
- object *m, *d, *x;
+ object *m, *d;
/* Create the module and add the functions */
m = initmodule("thread", thread_methods);
diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c
index 7c1cb67..e21ba9c 100644
--- a/Modules/xxmodule.c
+++ b/Modules/xxmodule.c
@@ -175,7 +175,6 @@ xx_new(self, args)
PyObject *self; /* Not used */
PyObject *args;
{
- int i, j;
XxoObject *rv;
if (!PyArg_ParseTuple(args, ""))