summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-05 21:58:58 (GMT)
committerGuido van Rossum <guido@python.org>1996-12-05 21:58:58 (GMT)
commitda9c2710c728407f47f34635a75647c56a9ec106 (patch)
treeb8248e8ba3432a2d4b4fc4034214a60b2b96cf9d /Objects
parent472c04f18f54327433c13601b25c7ea2c7071e6b (diff)
downloadcpython-da9c2710c728407f47f34635a75647c56a9ec106.zip
cpython-da9c2710c728407f47f34635a75647c56a9ec106.tar.gz
cpython-da9c2710c728407f47f34635a75647c56a9ec106.tar.bz2
Make gcc -Wall happy
Diffstat (limited to 'Objects')
-rw-r--r--Objects/complexobject.c14
-rw-r--r--Objects/frameobject.c2
-rw-r--r--Objects/object.c4
-rw-r--r--Objects/rangeobject.c2
-rw-r--r--Objects/stringobject.c4
5 files changed, 6 insertions, 20 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index e7d0898..175933a 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -532,20 +532,6 @@ complex_float(v)
return NULL;
}
-
-static object *
-complex_new(self, args)
- object *self;
- object *args;
-{
- Py_complex cval;
-
- cval.imag = 0.;
- if (!PyArg_ParseTuple(args, "d|d", &cval.real, &cval.imag))
- return NULL;
- return newcomplexobject(cval);
-}
-
static object *
complex_conjugate(self)
object *self;
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index ae18331..9d80e1f 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -154,7 +154,7 @@ newframeobject(back, code, globals, locals, owner, nvalues, nblocks)
if ((back != NULL && !is_frameobject(back)) ||
code == NULL || !is_codeobject(code) ||
globals == NULL || !is_dictobject(globals) ||
- locals != NULL && !is_dictobject(locals) ||
+ (locals != NULL && !is_dictobject(locals)) ||
nvalues < 0 || nblocks < 0) {
err_badcall();
return NULL;
diff --git a/Objects/object.c b/Objects/object.c
index 2bc1ba4..0af31ba 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -626,8 +626,8 @@ _Py_GetObjects(self, args)
/* Hack to force loading of cobject.o */
-static PyTypeObject *cobject_hack = &PyCObject_Type;
+PyTypeObject *_Py_cobject_hack = &PyCObject_Type;
/* Hack to force loading of abstract.o */
-static int (*abstract_hack) FPROTO((PyObject *)) = &PyObject_Length;
+int (*_Py_abstract_hack) FPROTO((PyObject *)) = &PyObject_Length;
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index caadc77..ee7af08 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -98,7 +98,7 @@ range_print(r, fp, flags)
if (j > 0 || i > 0)
fprintf(fp, ", ");
- fprintf(fp, "%d", r->start + j * r->step);
+ fprintf(fp, "%ld", r->start + j * r->step);
}
if (r->len == 1 && r->reps == 1)
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 3e0f04e..b880891 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -669,17 +669,17 @@ formatstring(format, args)
else {
/* Got a format specifier */
int flags = 0;
- char *fmtstart = fmt++;
int width = -1;
int prec = -1;
int size = 0;
int c = '\0';
int fill;
- object *v;
+ object *v = NULL;
object *temp = NULL;
char *buf;
int sign;
int len;
+ fmt++;
if (*fmt == '(') {
char *keystart;
int keylen;