]> granicus.if.org Git - python/commitdiff
Make gcc -Wall happy
authorGuido van Rossum <guido@python.org>
Thu, 5 Dec 1996 21:58:58 +0000 (21:58 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 5 Dec 1996 21:58:58 +0000 (21:58 +0000)
Objects/complexobject.c
Objects/frameobject.c
Objects/object.c
Objects/rangeobject.c
Objects/stringobject.c

index e7d0898a7bef742fc3863c8c35496616aebacaaa..175933a514e7a04f3ed8530d901ffa2902fd327c 100644 (file)
@@ -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;
index ae183311ff4e0579381c2b10d596bf05d8783248..9d80e1fd597a579d75e7b0d7901237fdbe7b44cb 100644 (file)
@@ -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;
index 2bc1ba4d60f5b4ffc1ab37250e5427c96bc56123..0af31babaaa3f6d0cf7b9af055ab1db29eaee2a7 100644 (file)
@@ -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;
index caadc77ca921398c210026cd38ea58096a433144..ee7af08d979942c7d70b30209826ed86433fa47c 100644 (file)
@@ -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)
index 3e0f04eee1cd3725615ba9a0e1834f16afe8f65d..b880891d9aa59a7273926984df2b5bd285c19201 100644 (file)
@@ -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;